My Oracle Support Banner

COMMENTS IN SOAP REQUESTS NOT PARSED CORRECTLY BY WEB SERVICE HANDLER (Doc ID 1370287.1)

Last updated on MAY 14, 2018

Applies to:

Oracle Weblogic Server - Version: 10.3.3 and later   [Release: and later ]
Information in this document applies to any platform.

Symptoms

When using  a handler in webservice code, deployed on 10.3.3 weblogic server to print the SOAP message, the comments in the request are incorrectly parsed.
The empty response is returned.

Eg:

private void printMessage(SOAPMessageContext smc) {
  SOAPMessage message = smc.getMessage();
  try {
       ByteArrayOutputStream byteArrOutStrm = new
       ByteArrayOutputStream();
       message.writeTo(byteArrOutStrm);
       System.out.println("SOAP Msg : " + byteArrOutStrm);
  } catch (Exception e) {
       System.out.println("Exception: " + e.getMessage());
       e.printStackTrace();
    }
}

For a web service request without comments, like the following:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:han="http://handler.webservice.vrds.gm.com">
<soapenv:Header/>
<soapenv:Body>
<han:getVehicleInvoiceDetails>
<vehicleInvoiceRequest>
<han:vehInvHdr>
<applId>OWB</applId>
<versionId>1.0</versionId>
</han:vehInvHdr>
<vehInvInp>
<applPwd>OWBTestPwd</applPwd>
<bac>120364</bac>
<country>CA</country>
<lang>en</lang>
<userId>OWBTestUser</userId>
<vinArr>
<vin>1G1ZB5EU1BF317434</vin>
</vinArr>
</vehInvInp>
</vehicleInvoiceRequest>
</han:getVehicleInvoiceDetails>
</soapenv:Body>
</soapenv:Envelope>

returns correctly with the following response:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getVehicleInvoiceDetailsResponse xmlns:ns3="http://webservice.vrds.gm.com" xmlns:ns2="http://handler.webservice.vrds.gm.com">
<ns2:VehicleInvoiceResponse>
<vehicleInvoiceHeader>
<applId>OWB</applId>
<versionId>1.0</versionId>
</vehicleInvoiceHeader>
<vehicleInvoice>
<vin>1G1ZB5EU1BF317434</vin>
</vehicleInvoice>
</ns2:VehicleInvoiceResponse>
</ns2:getVehicleInvoiceDetailsResponse>
</S:Body>
</S:Envelope>

When the request comes with comments like below:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:han="http://handler.webservice.vrds.gm.com">
<soapenv:Header/>
<soapenv:Body>
<han:getVehicleInvoiceDetails>
<!--Optional:-->
<vehicleInvoiceRequest>
<han:vehInvHdr>
<!--Optional:-->
<applId>OWB</applId>
<!--Optional:-->
<versionId>1.0</versionId>
</han:vehInvHdr>
<!--Optional:-->
<vehInvInp>
<!--Optional:-->
<applPwd>OWBTestPwd</applPwd>
<!--Optional:-->
<bac>120364</bac>
<!--Optional:-->
<country>CA</country>
<!--Optional:-->
<lang>en</lang>
<!--Optional:-->
<userId>OWBTestUser</userId>
<!--Zero or more repetitions:-->
<vinArr>
<!--Optional:-->
<vin>1G1ZB5EU1BF317434</vin>
</vinArr>
</vehInvInp>
</vehicleInvoiceRequest>
</han:getVehicleInvoiceDetails>
</soapenv:Body>
</soapenv:Envelope>

returns empty in response content: 

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getVehicleInvoiceDetailsResponse xmlns:ns3="http://webservice.vrds.gm.com" xmlns:ns2="http://handler.webservice.vrds.gm.com">
<ns2:VehicleInvoiceResponse/>
</ns2:getVehicleInvoiceDetailsResponse>
</S:Body>
</S:Envelope>



Changes

WebLogic server upgraded from 10.3.0 to 10.3.3. The problem does not occur on WebLogic server 10.3.0.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.