This is very strange I get two xmlns:recipe in the response. This is for Spring JDOM web service
Response:
XSD:Code:<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> <recipe:RecipeRefreshResponse xmlns:recipe="http://vicr.com/vmecs/schemas" xmlns:recipe="http://vicr.com/vmecs/schemas"> <recipe:code>0</recipe:code> <recipe:msg>SUCCESS</recipe:msg> </recipe:RecipeRefreshResponse> </soapenv:Body> </soapenv:Envelope>
Endpoint:Code:<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://vicr.com/vmecs/schemas" xmlns:schemas="http://vicr.com/vmecs/schemas"> <xs:element name="RecipeRefreshRequest"> <xs:complexType> <xs:sequence> <xs:element name="pid" type="xs:string" /> <xs:element name="userId" type="xs:string" /> <xs:element name="refreshReason" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="RecipeRefreshResponse"> <xs:complexType> <xs:sequence> <xs:element name="code" type="xs:string" /> <xs:element name="msg" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Code:Element responseElement = new Element("RecipeRefreshResponse", this.namespace); responseElement.addContent(new Element("code", this.namespace).setText("" + output.getCode())); responseElement.addContent(new Element("msg", this.namespace).setText("" + output.getMsg())); log.info(responseElement.toString()); return responseElement;


Reply With Quote