You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Frank Knoll <fr...@daasi.de> on 2007/07/19 18:26:11 UTC

how to handle arrays?

Hi,

I want to write a web service, that handles arrays of several types 
(please see attached WSDL file). I have written the web service with 
axis2 (databinding xmlbeans) and succeded with a client invoking the 
operations echoString, echoStringArray and echoStruct. The operations 
echoByteArray (handling base64Binary) and echoByteArray2 (handling a 
sequence of bytes) didn't work, throwing the following exception:

Exception in thread "main" org.apache.axis2.AxisFault: First Element 
must contain the local name, Envelope
    at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:81)
    at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:356)
    at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
    at 
org.apache.axis2.userguide.axis2sampledoclit.Axis2SampleDocLitServiceStub.echoByteArray2(Axis2SampleDocLitServiceStub.java:975)
    at clients.TestClient.echoByteArray2(TestClient.java:66)
    at clients.TestClient.main(TestClient.java:81)
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element 
must contain the local name, Envelope
    at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:221)
    at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:179)
    at 
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:135)
    at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:163)
    at 
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:111)
    at 
org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:474)
    at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:142)
    at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:77)
    ... 5 more

In using axis 1.4 none operation handling arrays succeeded.

What is wrong with the WSDL file and what do I have to do to make this 
work in axis 1.4 and axis2?

Cheers, Frank