• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Axis2 client - SOAPProcessingException

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Am building a wrapper webservice using Axis2 1.3 for an existing sharepoint webservice. Once i build the web service client, i write a test class to invoke the sharepoint webservice to retrieve a list of items; what am running into is an exception stack which says "org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found html"

Any kind of help is greatly apperciated.

please find the code below:
---------------------------
ListsStub proxy = new ListsStub();

HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();

List schemes = new ArrayList();

schemes.add(HttpTransportProperties.Authenticator.NTLM);
auth.setAuthSchemes(schemes);
auth.setUsername("username");
auth.setPassword("password");
auth.setDomain("domain");
auth.setHost("host");

/*proxy._getServiceClient().getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.CHUNKED,
Boolean.FALSE);*/

proxy._getServiceClient().getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
auth);

GetListItems getListItems = new com.microsoft.schemas.sharepoint.soap.ListsStub.GetListItems();
GetListItemsResponse response = new GetListItemsResponse();

response = proxy.GetListItems(getListItems);

Exception stack:
----------------
[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.microsoft.schemas.sharepoint.soap.ListsStub.GetListItems(ListsStub.java:2288)
at com.uboc.test.TestingWS.main(TestingWS.java:40)
Exception in thread "main" 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.microsoft.schemas.sharepoint.soap.ListsStub.GetListItems(ListsStub.java:2288)
at com.uboc.test.TestingWS.main(TestingWS.java:40)
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)

thank you.

Regards,
Sharon
 
shannon rocks
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the cause of this problem? How do i fix this? Please advice and help.

Thanks in advance
Sharon
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic