Sunday, March 6, 2011

WPS - trace for Web Service request

Web Service is very important part in SOA world for WebSphere, both WAS and WPS. Sometimes, you need to check the contents of web service request and web service reply. the following trace will show these contents in trace.log

com.ibm.ws.webservices.trace.MessageTrace=all

enable it in runtime and you will see the following:

[3/6/11 22:05:13:697 EST] 000088de MessageTrace  3   WSWS3569I: Inbound HTTP SOAP request:
Content-Type: text/xml; charset=utf-8
Message contents:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://
www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processTicket xmlns="http://RSDWorld
/IF_RSD"><ticket xmlns="">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</soapenv:Body></soapenv:Envelope>

and

[3/6/11 22:05:14:198 EST] 000088de MessageTrace  3   WSWS3572I: Outbound HTTP SOAP response:
Content-Type: text/xml; charset=utf-8
Message contents:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body>xxxxxxxxxxxxxxxxxxxx
</soapenv:Body></soapenv:Envelope>

this trace works for both WAS and WPS

Wednesday, March 2, 2011

WAS7 - "enum cannot be resolved to a type” error when deploying the module on WAS7

When deploying an EAR file including source code, you may see the error "enum cannot be resolved to a type" error  and the EAR file failed to deploy.

for solve this issue:

(1) In RAD, select the EAR project, then click "Project"->"Properties", click "Java Compiler" , make sure "Compiler compliance level" is 1.6

(2) export the EAR file with the option "Export source files"

when deploying the EAR file from WebSphere Administrative console, you have to specify the "JDK Compliance Level" as "6.0" , see the following screenshot


After specified the JDK Compliance level correctly, the error should be gone.