Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 157045

Summary: Missing SOAP Envelope or Body
Product: javame Reporter: gs <gs-nb>
Component: Web ServicesAssignee: Petr Suchomel <psuchomel>
Status: RESOLVED INVALID QA Contact: issues <issues.netbeans.org>
Priority: P1 CC: jungi
Version: 6.x   
Target Milestone: TBD   
Hardware: All   
OS: All   
Whiteboard:
Issue Type: DEFECT Exception Report:

Description gs 2009-01-19 11:32:40 UTC
When using a Java ME Web Service Client to access a Windows .NET web service the jaxrpc Operations class throws an 
JAXRPCException due to a java.rmi.MarshalException with the text "Missing SOAP Body or Envelope" while debugging a 
phone application in the emulator. NetBeans was running on a Windows Vista platform.

The following request frame was captured by Microsoft Windows Network Monitor:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:tns="http://sys.service.rmas.dk/">
<soap:Body>
<tns:User_Login>
<tns:UserName>test</tns:UserName>
<tns:Password>a41d1ca98f00b204e9807998ecf842fe</tns:Password>
</tns:User_Login>
</soap:Body>
</soap:Envelope>

This resulted in the following response frame:

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><SecurityHeader 
xmlns="http://sys.service.rmas.dk/"><o_user /><o_password /><o_result /></SecurityHeader></soap:Header><soap:Body><User
_LoginResponse 
xmlns="http://sys.service.rmas.dk/"><User_LoginResult><Status>None</Status></User_LoginResult></User_LoginResponse></so
ap:Body></soap:Envelope>

You can see that NetBeans is polite and inserts a linefeed after each tag sent, whereas the server is rude and returns 
everything on one single line. The server was a Microsoft-IIS/6.0 with ASP.NET 2.0.50724.

Both the Envelope and Body tags are present as required, but they are in the middle of the line.
I suspect that the NetBeans SOAP parser expects these tags to be on the start of a line, as they are in most examples.
Consequently the parser cannot find the tags and the exception is thrown.
Comment 1 Lukas Jungmann 2009-01-19 11:36:50 UTC
=> mobility/webservices
Comment 2 Petr Suchomel 2009-01-27 12:21:45 UTC
Please are you talking about communication when IDE gets WSDL file or about communication between service and emulator?
Comment 3 Andrei Chistiakov 2009-09-18 11:32:35 UTC
Without requested information for long time - INVALID. We can't do anything in this case. Reporter, please add requested
information and reopen issue. Thanks in advance.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo