Generating a proxy for a WCF Service in Java and PHP Duplicate Message Error
I get the following output error when trying to generate a p开发者_开发问答roxy for a WCF Service using both PHP and Java:
with Java I am using wsimport with Jaxws and JaxB with PHP I am using wsdl2php
The error that I get is the following:
[ERROR] duplicate "message" entity: "IWcfRequestProcessor_ProcessRequests_InputMessage line 1 of http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Service.svc?wsdl
The only message entities inside the wsdl are:
<wsdl:message name="IWcfRequestProcessor_ProcessRequests_InputMessage">
<wsdl:part name="parameters" element="tns:ProcessRequests"/>
</wsdl:message>
<wsdl:message name="IWcfRequestProcessor_ProcessRequests_OutputMessage">
<wsdl:part name="parameters" element="tns:ProcessRequestsResponse"/>
</wsdl:message>
<wsdl:message name="IWcfRequestProcessor_ProcessOneWayRequests_InputMessage">
<wsdl:part name="parameters" element="tns:ProcessOneWayRequests"/>
</wsdl:message>
So as you can see there are no duplicates so I cannot understand why this error is being raised.
Any help is appreciated:
Andrew
The problem was caused by FQDN (Full Qualified Domain Name). I was not using the one which was displayed on the default svc page. For example I was trying 127.0.0.1/MyService.svc when it was actually resolving to D4testtest.mynetwork.com/MyService.svc .
Because both are valid, both addresses seemed to be taken into consideration and so on the second pass, it had already parsed the wsdl thus generating this error, which is valid.
Cheers,
Andrew
I had a import statement which is loading the file with same message name. removal of import solved my issue.
精彩评论