SOAP Problem

Chad

New Member
Hi there,

I seem to be almost there with a small web service application I have been attempting to develop. However, I seem to be having a problem with this final part:

The request I am generating (which I have viewed using proSoapView):
Code:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns0:OperatorInfo xmlns:ns0="http://mywebservice.com/pcws.V1.0.0.1">
<ns0:ApplicationID>0000000000000-0000-0000-000000000000</ns0:ApplicationID>
<ns1:OperatorID xmlns:ns1="http://mywebservice.com/pcws.V1.0.0.1">OPid</ns1:OperatorID>
<ns2:OperatorPassword xmlns:ns2="http://mywebservice.com/pcws.V1.0.0.1">OPpasword</ns2:OperatorPassword>
</ns0:OperatorInfo>
</SOAP-ENV:Header>
<SOAP-ENV:Body xmlns:s0="http://mywebservice.com/pcws.V1.0.0.1" xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:s2="http://www.w3.org/2001/XMLSchema">
<s0:ExecuteAction>
<s0:request xsi:type="UpdatePaymentPlanStatusRequest">
  <PaymentPlanID>0000000000000-0000-0000-000000000000</PaymentPlanID>
  <Status>Suspended</Status>
</s0:request>
</s0:ExecuteAction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The part that is causing the error is:
<s0:ExecuteAction>

This should be:
<s0:ExecuteAction xmlns="http://mywebservice.com/pcws.V1.0.0.1">

If I insert this manually into the xml via the proSoapViewer and resend the request it works fine and I recieve a successfull response.

I am unsure how to add the namespace at this point as this is code that is generated by progress as part of the SOAP wrapper in effect.

Any help would be much appreciated.

Thanks
Chad
 
It is kinda strange to me.

Here is example to query CurrencyExchange external WebServer:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cur="http://www.daenet.de/webservices/CurrencyServer">
<soapenv:Header/>
<soapenv:Body>
<cur:getCurrencyValue>
<!--Optional:-->
<cur:provider>?</cur:provider>
<!--Optional:-->
<cur:srcCurrency>?</cur:srcCurrency>
<!--Optional:-->
<cur:dstCurrency>?</cur:dstCurrency>
</cur:getCurrencyValue>
</soapenv:Body>
</soapenv:Envelope>

In this example Namespace already defined as cur= xmlns:cur="http://www.daenet.de/webservices/CurrencyServer"
In your case is it also defined as "s0"
Try SoupUI to connect to this external web service and check what is soap request will be generated by soapUI.

check also this thread
http://www.progresstalk.com/showthread.php?117134-sample-Currency-Web-Service-invoke
 

Chad

New Member
Hi Maxim,

Thanks for you response, I have also tried this using SoapUI with the same result. If I use the code generated by progress then I have an unsuccessfull response, however if I add the missing namespace it works. As you say strange even though the <s0:ExecuteAction> is already qualified with the name space s0: Is there a way to add this namespace to the soap wrapper that is being generated by progress?
 
I am not sure it is possible using ABL.
But I never used openedge as webservice client, only as webserver (by wsa). wsa do not require to set namespace. So maybe I am mistaken.
 

Chad

New Member
I am using the SAX writer to generate the xml fragments to insert into the SOAP wrapper that is generated by progress.

If I were to insert the code you are suggesting my xml would look like:

<SOAP-ENV:Body xmlns:s0="http://mywebservice.com/pcws.V1.0.0.1" xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:s2="http://www.w3.org/2001/XMLSchema">
<s0:ExecuteAction>
<s0:ExecuteAction xmlns="http://mywebservice.com/pcws.V1.0.0.1">
<s0:request xsi:type="UpdatePaymentPlanStatusRequest">
<PaymentPlanID>0000000000000-0000-0000-000000000000</PaymentPlanID>
<Status>Suspended</Status>
</s0:request>
</s0:ExecuteAction>
</s0:ExecuteAction>
</SOAP-ENV:Body>

Which would error when the request is sent. the <s0:ExecuteAction> tag is created in the SOAP wrapper which I am unsure how to programatically manipulate this.

Thanks for your suggestion though...
 
Top