Hi,

Most probably the endpoint address which is used by the client to send the
request is sending an HTML page.  Check whether the web service exists at
the location given in the WSDL and it is not sending an HTML error page or
something.

Upul

On Fri, Mar 7, 2008 at 11:46 AM, Anshuman Srivastava <[EMAIL PROTECTED]>
wrote:

>
> I've used WSDL2Java tool client to generate client stubs for a service I
> want
> to consume.
>
> I have created one test client. But when I run it , I get the exception as
> below. As I am new to web services, I am unable to solve it.
>
> [INFO] OMException in getSOAPBuilder
> org.apache.axiom.soap.SOAPProcessingException: First Element must contain
> the local name, Envelope , but found html
>        at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(
> StAXSOAPModelBuilder.java:219)
>        at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(
> StAXSOAPModelBuilder.java:177)
>        at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java
> :163)
>        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.BuilderUtil.getSOAPBuilder(BuilderUtil.java:609)
>        at
> org.apache.axis2.transport.TransportUtils.createDocumentElement(
> TransportUtils.java:178)
>        at
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:111)
>        at
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:87)
>        at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:326)
>        at
> org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:389)
>        at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:211)
>        at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>        at
>
> com.agilent.www.schemas.quoteconfirmation.QuoteConfirmationStub.QuoteConfirmationOper
> (QuoteConfirmationStub.java:165)
>        at
> com.agilent.www.schemas.quoteconfirmation.client.TestWSClient.main(
> TestWSClient.java:28)
> [INFO] Remaining input stream :[]
> org.apache.axis2.AxisFault: First Element must contain the local name,
> Envelope , but found html
>        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>        at
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:89)
>        at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:326)
>        at
> org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:389)
>        at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:211)
>        at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>        at
>
> com.agilent.www.schemas.quoteconfirmation.QuoteConfirmationStub.QuoteConfirmationOper
> (QuoteConfirmationStub.java:165)
>        at
> com.agilent.www.schemas.quoteconfirmation.client.TestWSClient.main(
> TestWSClient.java:28)
> Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element
> must
> contain the local name, Envelope , but found html
>        at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(
> StAXSOAPModelBuilder.java:219)
>        at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(
> StAXSOAPModelBuilder.java:177)
>        at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java
> :163)
>        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.BuilderUtil.getSOAPBuilder(BuilderUtil.java:609)
>        at
> org.apache.axis2.transport.TransportUtils.createDocumentElement(
> TransportUtils.java:178)
>        at
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:111)
>        at
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:87)
>        ... 6 more
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Help-with-Axis-2-client-tp15890572p15890572.html
> Sent from the Axis - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to