cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming webservice error

Former Member
0 Kudos

We have extracted the WSDL file successfully received from client but when tried to access/consume the web service got below mentioned error message:

org.apache.axis2.AxisFault: First Element must contain the local name, Envelope , but found definitions

at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:118)

at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)

at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)

at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)

at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)

at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

at mc_style.functions.soap.sap.document.sap_com.Z_BAPI_PARK_DOCUMENTServiceStub.zBapiParkDocument(Z_BAPI_PARK_DOCUMENTServiceStub.java:181)

at com.newgen.wns.util.TestArchiveClient.main(TestArchiveClient.java:353)

Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found definitions

at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:267)

at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:214)

at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:196)

at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:207)

at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:161)

at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:110)

at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:60)

at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:192)

at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:140)

at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:103)

... 7 more

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Ranjith,

Was this resolved? If so, how?

We are facing the same problem.

Please help in this regard.

Thanks,

Ajay

matt
Active Contributor
0 Kudos

Moved to more appropriate forum.

Former Member
0 Kudos

Hi Ranjit,

First test the web service by an independent tool such as SOAP UI, as SAP does not support certain kind of functionality.

Regards,

Ramnivas

ThomasZloch
Active Contributor
0 Kudos

Maybe the average ABAP developer cannot help you here. Did you consider asking the client what's wrong with his web service or WSDL file and if other "consumers" have the same problem?

Thomas

brad_bohn
Active Contributor
0 Kudos

...Or load it in SOAPUI or another web service project tool and see if it works?

The wizard is not very flexible at all. Conventions that are acceptable in other development platforms just don't work here...typical SAP.

Or is this a SAP generated service? There's a line with a 'Z' BAPI function in there???

Edited by: Brad Bohn on Apr 7, 2011 8:58 AM

Former Member
0 Kudos

Its actually cretaed by standard wizard of creation of webservice from RFC function module.

We creted it in our system (release 700 highest support pack 011) ,here it is working fine.

But our client is in release 701, and there we get the issue.

Regards,

Ranjit