Discussions

XML & Web services: How to change WSDL schema definition to suit incoming requests?

  1. We are migrating a webservice project from WAS (Websphere Application Server) 5.1 to WAS 6.1 and are encountering problems related to SOAP requests received from a desktop tool that uses this service. Theoretically the tool accessing our service should have taken the WSDL from us and generated the client but that has not happened(The tool is developed using C++ and sends the request which has been hard coded in it) and now changes to the tool in near future is beyond scope hence we need to do a work around to make this service work for the tool. The WSDL and a sample soap request is pasted below. The request coming from the tool doesn't have namespace information which is conformant to the target namespace defined in the wsdl. All this worked fine for WAS 5.1 as there was no strict namespace checking but with WAS 6.1 its failing due to namespace validations. Now, what we would like to do is to align the schema definition with what we receive in the SOAP request. We would like to make the schema validations work for the incoming requests that are in the attached format. So essentially our requirement is to enforce the namespace validations for requestHeader elements and bypass them for the others. Can anybody please provide leads on what changes we need to do in the schema definition to suit the requests that are coming to us. ( I know this is an odd scenario but then we have to live in real world ! ) ------------------------------------------------------------ WSDL ------------------------------------------------------------ <!--?xml version="1.0" encoding="UTF-8"?--> ------------------------------------------------------------ REQUEST MESSAGE ------------------------------------------------------------ <!--?xml version="1.0"?--> 3.0 EmbeddedLicenseManagement Local LicenseRequest 1.0 2becd309c7444b8986108b1a43ee5974 2008-09-25T10:09:01.939Z en_US DesktopTool DesktopTool Y prog123 prog123 0011211211212212121121 XXXX Tool 1.0 27-aug-2012 00163AA44554 AB0C61111111AABVVVXV COMP XXXX PPTTool 1.0 22-dec-2009 00163AA44554 AB0C61111111AABVVVXV COMP
  2. Couldn't you write a JAX-RPC handler to plugin to the server that parses the incoming message as XML and then feeds the resulting data to the application server?