Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildOutputMessage is big different with SoapUI #57

Open
hikarulin opened this issue Sep 11, 2017 · 1 comment
Open

buildOutputMessage is big different with SoapUI #57

hikarulin opened this issue Sep 11, 2017 · 1 comment

Comments

@hikarulin
Copy link

Here is my code:
Wsdl wsdl = Wsdl.parse("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl");
wsdl.printBindings();
List<SoapOperation> soapOperationList = new ArrayList<SoapOperation>();
List<QName> bindQnames = wsdl.getBindings();
for (QName qName : bindQnames) {
SoapBuilder soapBuilder = wsdl.binding().localPart(qName.getLocalPart()).find();
soapOperationList.addAll(soapBuilder.getOperations());
for (SoapOperation oper : soapBuilder.getOperations()) {
if ("getSupportDataSet".equals(oper.getOperationName())) {
System.out.println(qName.getNamespaceURI() + ":" + qName.getLocalPart());
System.out.println(" " + oper.getOperationName());
System.out.println(" " + soapBuilder.getOperationBuilder(oper).buildOutputMessage(context));
}
}
}
When I build sample request for operation 'getSupportDataSet',I get a very large XML string(hundreds of lines).
I believe it's the problem of below code in wsdl file,but I don't konw how to solve it.

s:element name="getSupportDataSetResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="getSupportDataSetResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema"/>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
/s:element>

Is there any suggestion?

@hikarulin
Copy link
Author

I just solved the problem.

Because SoapUI read file(soapui-settings.xml) to find exclude_type, so SoapUI ignore type [{http://www.w3.org/2001/XMLSchema}schema].

I add my exclude-type like below code,and it works.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant