on 04-21-2015 2:02 PM
Hello,
After having generated an ABAP proxy consuming class for a SOAP Web Service, I'm calling one of the methods in a program but the resulting return is empty. So I've tested the same method in SE80 to find out what's going wrong and I'm getting the following error:
SOAP:1.001 CX_ST_GROUP_MISSING_CASE:.Element {http://www.indexeducation.com/frahtm/HpSvcW.html}return missing.
Here is the complete answer from the call:
<n0:NombreCoursResponse xmlns:n0="http://www.indexeducation.com/frahtm/HpSvcW.html" xmlns:NS1="http://www.indexeducation.com/frahtm/HpSvcW.html" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><return xsi:type="xsd:unsignedInt">15545</return></n0:NombreCoursResponse>
the message seems correct, I think I've missed something during the class generation but can't find what.
Thanks
Hi Mark
if I try to consume RPC endoded WS in sap pi, do i need to do any changes in SAP PI?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jerome,
Your webservice looks like RPC-encoded. Correct me if I am wrong, but I think
consumer proxies are document-literal. When you load a wsdl in PI 7.1 and above
you have the option to use rpc, not sure if you have that option when you load
the wsdl directly in se80.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
yes the service is RPC encoded, and I didn't saw an option for this when I created the proxy. I used the RPC encoded because I'm facing another error when I'm trying to generate the consumer proxy with the document/ literal version of the wsdl.
The generation stops and I get an information message "message part refers a type not an element"
The problem is in the response message:
<wsdl:message name="ReponseNombreCours">
<wsdl:part name="return"
type="xsd:unsignedInt" />
</wsdl:message>
Regards
Hi Mark,
the original WSDL is huge, I've made one with one method and the problem I mentionned:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="HpSvcWFR"
targetNamespace="http://www.indexeducation.com/frahtm/HpSvcW.html"
xmlns:hp="http://www.indexeducation.com/frahtm/HpSvcW.html"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://www.indexeducation.com/frahtm/HpSvcW.html">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"
schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:simpleType name="THpSvcWCleCours">
<xsd:restriction base="xsd:unsignedInt" />
</xsd:simpleType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="ReponseNombreCours">
<wsdl:part name="return"
type="xsd:unsignedInt" />
</wsdl:message>
<wsdl:message name="RequeteNombreCours" />
<wsdl:portType name="IHpSvcWCours">
<wsdl:operation name="NombreCours">
<wsdl:input message="hp:RequeteNombreCours" />
<wsdl:output message="hp:ReponseNombreCours" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BindingCours"
type="hp:IHpSvcWCours">
<wsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="NombreCours">
<wsoap:operation soapAction="urn:HpSvcW2015:IHpSvcWCours#NombreCours" />
<wsdl:input>
<wsoap:body namespace="http://www.indexeducation.com/frahtm/HpSvcW.html"
use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
</wsdl:input>
<wsdl:output>
<wsoap:body namespace="http://www.indexeducation.com/frahtm/HpSvcW.html"
use="literal"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HpSvcWDonnees">
<wsdl:port name="PortCours"
binding="hp:BindingCours">
<wsoap:address location="http://polinycedev/hpsw/Cours" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
thanks for your help,
regards
Hi Jerome,
The problem is in the response message:
<wsdl:message name="ReponseNombreCours">
<wsdl:part name="return"
type="xsd:unsignedInt" />
</wsdl:message>
Yes, that is indeed the problem. Here's what I did
1. Added a new complex type in the wsdl:types section
<xsd:element name="ReponseNombreCours">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="return" type="xsd:unsignedInt" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
2. Refer this on the wsdl:message
<wsdl:message name="ReponseNombreCours">
<wsdl:part name="ReponseNombreCoursType" element="hp:ReponseNombreCours" />
</wsdl:message>
You should be able to regenerate it (document-literal) in sproxy now.
Regards,
Mark
Hi Jerome,
There is an import statement in your WSDL
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
I'm not sure how to do this via se80 though. In PI, you can easily see the two definitions. The xsd can be downloaded from http://schemas.xmlsoap.org/soap/encoding/, but you need to link it to your wsdl for the proxy generation to work.
Regards,
Mark
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.