Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating a proxy for a WCF Service in Java and PHP Duplicate Message Error

Tags:

java

php

wsdl

wcf

I get the following output error when trying to generate a proxy 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

like image 437
REA_ANDREW Avatar asked Aug 30 '26 12:08

REA_ANDREW


1 Answers

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

like image 196
REA_ANDREW Avatar answered Sep 01 '26 00:09

REA_ANDREW



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!