I got the back-end[1] for my task. When I invoke [1] through SOAP UI with
empty soap header it works and gives 200 ok. But when I remove empty header
the backend gives 500 error.

Is this valid behavior or a bug in the back-end?

If it is a valid behavior how to send empty soap header when creating soap
payload using payload factory. Currently, as a temporary solution, I am
adding dummy header like below.


         <payloadFactory media-type="xml">
            <format>
               <soapenv:Envelope xmlns:soapenv="http://schemas.
xmlsoap.org/soap/envelope/">
                *   <soapenv:Header>*
*                     <dummyvalue>12</dummyvalue>*
*                  </soapenv:Header>*
                    <soapenv:Body>
                     <ser:readMediData xmlns:ser="http://service.
sample.durdans.com">
                        <ser:patientId>500</ser:patientId>
                     </ser:readMediData>
                  </soapenv:Body>
               </soapenv:Envelope>
            </format>
            <args>
               <arg value="1990"/>
            </args>
         </payloadFactory>

[1]. https://192.168.55.160:9443/services/
<https://192.168.55.160:9443/services/AsiriPatientService>
DurdansPatientService
<http://192.168.55.160:9763/services/DurdansPatientService?wsdl>.

Thanks
Dilusha


On Sun, Nov 12, 2017 at 1:23 AM, Bhathiya Jayasekara <[email protected]>
wrote:

> As per the log, your backend is sending the 500. What is your backend?
> Check that.
>
> Thanks,
> Bhathiya
>
> On Sun, Nov 12, 2017 at 12:16 AM, Dilusha Alphonso <[email protected]>
> wrote:
>
>> Hi All,
>>
>> I am using a wum pack of ESB 5.0.0(wso2esb-5.0.0.1510144891829).I have
>> created API in ESB. Below is the payload of my API configuration.
>>
>>          <payloadFactory media-type="xml">
>>             <format>
>>                <soapenv:Envelope xmlns:soapenv="http://schemas.
>> xmlsoap.org/soap/envelope/">
>>                   <soapenv:Header/>
>>                     <soapenv:Body>
>>                      <ser:readMediData xmlns:ser="http://service.samp
>> le.durdans.com">
>>                         <ser:patientId>500</ser:patientId>
>>                      </ser:readMediData>
>>                   </soapenv:Body>
>>                </soapenv:Envelope>
>>             </format>
>>             <args>
>>                <arg value="1990"/>
>>             </args>
>>          </payloadFactory>
>>
>> I find fault string exception logged in the console for this payload. But
>> when I add a dummy header in the request payload, I was able to get the 200
>> OK response. getting.
>> Please let me know whether this is a best practice.
>>
>> I have attached the screenshot of the wire log.
>>
>> Please provide the suggestion.
>>
>> Thanks
>> Dilusha
>>
>>
>> --
>>
>>
>> *Best Regards,Dilusha Alphonso*
>>
>> *Software Engineer - Support Team*
>>
>>
>> *WSO2*
>> *Mobile : *
>>
>> *+94766837098 <076%20683%207098>[image: http://wso2.com/signature]
>> <http://wso2.com/signature>*
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Bhathiya Jayasekara*
> *Associate Technical Lead,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185 <+94%2071%20547%208185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>



-- 


*Best Regards,Dilusha Alphonso*

*Software Engineer - Support Team*


*WSO2*
*Mobile : *

*+94766837098[image: http://wso2.com/signature] <http://wso2.com/signature>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to