on 03-26-2012 11:44 AM
Hi all,
I created a Consumer Client Webservice from a WSDL file. The call to the webservice runs correctly, the response message is received but on receiving somewhere in the SOAPRuntime the payload is ignored and not parsed. I think its a namespace issue. I had to add to the Webservice configuration after the wsdl upload the in the logical port in SOAMANAGER the IP string not the server name and then the webservice started working.
On debugging the execute call I noticed the queue name the namespace for this was referring to the server string not the IP address and then on parsing the XML it failed to find what it was looking for???
The Response part from the payload trace in SOAMANAGER is as follows:-
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<changeRoutesResponse
xmlns="urn:MyRotasWS">
<erroMsg xmlns="">NAO E POSSIVEL AUTENTICAR</erroMsg>
<valid xmlns="">FALSE</valid>
</changeRoutesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Original WSDL (note <IP string> stands for ie 10.67.0.2 as an example and <IP server> stands for mySAPserver)
<wsdl:definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://<IP string>//extraWpms/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://<IP string>/extraWpms/">
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://<IP string>//extraWpms/">
<xsd:complexType name="auth">
<xsd:all>
<xsd:element name="from" type="xsd:string" />
<xsd:element name="password" type="xsd:string" />
<xsd:element name="messageID" type="xsd:string" />
<xsd:element name="envn" type="xsd:string" />
</xsd:all>
</xsd:complexType>
<xsd:complexType name="InputChangeRoute">
<xsd:all>
<xsd:element name="Armazem" type="xsd:string" />
<xsd:element name="DiaSemana" type="xsd:string" />
<xsd:element name="RotaEntrega" type="xsd:string" />
<xsd:element name="SequenciaAltra" type="xsd:string" />
<xsd:element name="Onda" type="xsd:string" />
<xsd:element name="Descricao" type="xsd:string" />
<xsd:element name="HoraExpedicao" type="xsd:string" />
<xsd:element name="TempoPrevistoExecucao" type="xsd:string" />
<xsd:element name="TipodeVeiculo" type="xsd:string" />
<xsd:element name="Transportador" type="xsd:string" />
<xsd:element name="ListaDesembarques" type="tns:ListDesembarques" />
</xsd:all>
</xsd:complexType>
<xsd:complexType name="Desembarque">
<xsd:all>
<xsd:element name="Loja" type="xsd:string" />
<xsd:element name="HoraPrevista" type="xsd:string" />
<xsd:element name="DiaSemana" type="xsd:string" />
<xsd:element name="Sequencia" type="xsd:string" />
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ListDesembarques">
<xsd:sequence>
<xsd:element name="desembarque" type="tns:Desembarque" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ListInputChangeRoute">
<xsd:sequence>
<xsd:element name="inputChangeRoute" type="tns:InputChangeRoute" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="changeRoutesRequestType">
<xsd:all>
<xsd:element name="auth" type="tns:auth" form="unqualified" />
<xsd:element name="routes" type="tns:ListInputChangeRoute" form="unqualified" />
</xsd:all>
</xsd:complexType>
<xsd:complexType name="changeRoutesResponseType">
<xsd:all>
<xsd:element name="erroMsg" type="xsd:string" form="unqualified"/>
<xsd:element name="valid" type="xsd:string" form="unqualified"/>
</xsd:all>
</xsd:complexType>
<xsd:element name="changeRoutes" type="tns:changeRoutesRequestType" />
<xsd:element name="changeRoutesResponse" type="tns:changeRoutesResponseType" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="changeRoutesRequest">
<wsdl:part name="parameters" element="tns:changeRoutes" />
</wsdl:message>
<wsdl:message name="changeRoutesResponse">
<wsdl:part name="parameters" element="tns:changeRoutesResponse" />
</wsdl:message>
<wsdl:portType name="MyRotasWSPortType">
<wsdl:operation name="changeRoutes">
<wsdl:documentation>NA</wsdl:documentation>
<wsdl:input message="tns:changeRoutesRequest" />
<wsdl:output message="tns:changeRoutesResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyRotasWSBinding" type="tns:MyRotasWSPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="changeRoutes">
<soap:operation soapAction="urn:MyRotasWS#changeRoutes" style="document" />
<wsdl:input>
<soap:body use="literal" namespace="urn:MyRotasWS" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" namespace="urn:MyRotasWS" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyRotasWS">
<wsdl:port name="MyRotasWSPort" binding="tns:MyRotasWSBinding">
<soap:address location="http://<server string>/extraWpms/MyRotasWS.php" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Any help appreciated. It was all meant to be so simple...
Hi,
Your response says "NAO E POSSIVEL AUTENTICAR", which means "Unable to authenticate" (in portuguese) according to google translate. So what you should focus on is to provide proper authentication credentials in the call. Start with this, as it might solve more problems than you expect
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thankyouf or your response. Correct it is Portuguese for unable to authenticate. But the issue is the response message is not returned to the code I use to call the webservice. And the reponse payload also is discarded so I cannot even query the payload on my own. The text in the error message at this point is not really relevant so please pay it no mind at this point.
try.
CREATE OBJECT lo_clientproxy.
* Get payload protocol
lo_payload_protocol ?=
lo_clientProxy->get_protocol( if_wsprotocol=>payload ).
* announce payload consumption, only for WS proxies
lo_payload_protocol->announce_payload_consumption( ).
CALL METHOD lo_clientproxy->change_routes
EXPORTING
input = ls_request
IMPORTING
output = ls_response.
Nothing is returned in ls_response just the exception CX_AI_SYSTEM_FAULT. And this is generated in the execute method when the payload response is returned not bound.
Any other ideas on the WSDL....response namespaces...I did see that the outbound request is in UTF-8 format and the response comes back with ISO-8859-1.
thanks,
As far as I know, this is a normal behaviour: what you get is not a SOAP Response, but a SOAP Fault, so it won't be captured by the ls_response. You can try capturing this cx_ai_system_fault into some local variable and displaying the error details:
DATA: lo_exception TYPE cx_ai_system_fault,
lv_description TYPE string.
TRY.
...
CATCH cx_ai_system_fault INTO lo_exception.
lv_description = lo_exception->get_text( ). "or get_longtext( )
"do whatever you need with the error description
ENDTRY.
Hope this helps,
Greg
Yes it gives CX_AI_SYSTEM_FAULT: Error during proxy processing (PART UNKNOWN (NULL) ) No fault part just the response part in the payload as can be seen when I have full trace on the SOAMANAGER.
I am debugging to the part of the code where it drops the ball...I will add this when I have more details. Thanks for your assistance so far. I really do think its something to do with the namespaces but I am not sure how to fix it.
So its a namespace issue. The response from the WS server states the server name not the IP address string. We have had to use the IP address string due to different infrastructure. The "Part" referred to is the element <part> referenced in the wsdl...
<wsdl:part name="parameters" element="tns:changeRoutes" />
Unknown because the namespace is different luckily for me
>We have had to use the IP address string due to different infrastructure
If it is a namespace prefix issue handle through XMLAnonymizerBean Module. if you need to change namespaces use XSLT mapping or java mapping.
Search SDN for XSLT mapping or java mapping. There are plenty of discussions on this forum.
Just namespace prefix issues, follow the link
http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.