Re: WCF SOAP WSDL... Parsing Schema: element error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5 January 2011 11:04, etangle <shahid.mehmud@gmail.com> wrote:
>
> Dear,
> You still have name resolution problem, please check if you are using
> windows (hosts file):
> c:\windows\system32\drivers\etc\hosts
> and add the following:
> gadm01wsrv04 Â Â84.235.63.38 # Supplied by etangle
> gadm01wsrv01 Â Â84.235.63.38 # Guessed by me and passed
> gadm01wsrv02 Â Â84.235.63.38 # Guessed by me and failed
> gadm01wsrv03 Â Â84.235.63.38 # Guessed by me and not even got that far
>
> This worked for me, and should work for you too...
> Regards,
> Shahid
>
> RQuadling wrote:
>>
>> On 4 January 2011 12:53, Shahid Mahmud <shahid.mehmud@gmail.com> wrote:
>>> Dear Richards,
>>>
>>> thanks for your efforts, i checked from my service provider, and he
>>> confirmed that all mentioned hosts conform to same one ip...
>>> Can you also copy or mail me the part of script you are testing...
>>>
>>> Rgds,
>>> Shahid Mahmud
>>>
>>>
>>> On Tue, Jan 4, 2011 at 21:43, Richard Quadling <rquadling@gmail.com>
>>> wrote:
>>>>
>>>> On 4 January 2011 10:30, Richard Quadling <rquadling@gmail.com> wrote:
>>>> > On 2 January 2011 23:00, etangle <shahid.mehmud@gmail.com> wrote:
>>>> >>
>>>> >> There is a trick for that:
>>>> >>
>>>> >> In your windows hosts file, add after localhost
>>>> >> gadm01wsrv04 Â Â84.235.63.38
>>>> >>
>>>> >> I appreciate your help...
>>>> >>
>>>> >>
>>>> >>
>>>> >> etangle wrote:
>>>> >>>
>>>> >>> Hello Everyone,
>>>> >>> I am trying to access a WCF WSDL service to send message, but
>>>> getting
>>>> >>> following error:
>>>> >>>
>>>> >>> SOAP-ERROR: Parsing Schema: element
>>>> >>>
>>>> >>>
>>>> 'http://schemas.microsoft.com/2003/10/Serialization/Arrays:ArrayOfstring'
>>>> >>> already defined
>>>> >>>
>>>> >>> I am using native SOAP extension of php, and also tried with nuSOAP,
>>>> >>> but
>>>> >>> getting same error...
>>>> >>> My script looks as; using deliverMTMessage method with parameters...
>>>> >>>
>>>> >>> <?php
>>>> >>> try {
>>>> >>> Â Â$client = new
>>>> >>> SoapClient("http://84.230.69.67/MTRECEIVER/TSLMTRECEIVER.svc?wsdl";);
>>>> >>> Â Â$response=$client->deliverMTMessage(array(
>>>> >>>
>>>> >>> 'applicationId' => '5789',
>>>> >>>
>>>> >>> 'username'=>'nickname',
>>>> >>>
>>>> >>> 'password' => 'WknqPI==',
>>>> >>>
>>>> >>> 'price' => '',
>>>> >>>
>>>> >>> 'moMessageId' => '',
>>>> >>>
>>>> >>> 'mTMessageId' => '',
>>>> >>>
>>>> >>> 'telcoId' => '8',
>>>> >>>
>>>> >>> 'receiverMsisdn' => '97650000000',
>>>> >>>
>>>> >>> 'senderMsisdn' => '97650000000',
>>>> >>>
>>>> >>> 'messageType' => 'SMS',
>>>> >>>
>>>> >>> 'mtType' => '2',
>>>> >>>
>>>> >>> 'messageText' => 'test message from shahid',
>>>> >>>
>>>> >>> 'serviceType' => '1',
>>>> >>>
>>>> >>> 'additionalInformation' => '',
>>>> >>>
>>>> >>> 'shortCode' => '836282',
>>>> >>>
>>>> >>> 'billServiceID' => '',
>>>> >>>
>>>> >>> 'priority' => '1'));
>>>> >>> Â Âprint_r($response);
>>>> >>> Â Âecho htmlentities($response);
>>>> >>>
>>>> >>> Â Â } catch (SoapFault $e) {
>>>> >>> Â Âprint_r($e->getMessage());
>>>> >>> Â}
>>>> >>> ?>
>>>> >>>
>>>> >>> I shall appreciate any help...
>>>> >
>>>> > And for http://gadm01wsrv01/MTRECEIVER/TSLMTRECEIVER.svc?xsd=xsd0 ?
>>>> >
>>>> > And for server 2 ?
>>>> >
>>>> > Server2 doesn't seem to be on the same address as I've amended my
>>>> > hosts file to ...
>>>> >
>>>> > gadm01wsrv04 Â Â84.235.63.38 # Supplied by etangle
>>>> > gadm01wsrv01 Â Â84.235.63.38 # Guessed by me and passed
>>>> > gadm01wsrv02 Â Â84.235.63.38 # Guessed by me and failed
>>>> > gadm01wsrv03 Â Â84.235.63.38 # Guessed by me and not even got that far
>>>> > as server 2 fails.
>>>> >
>>>> > If you are going to make the service public, then can you use public
>>>> > addresses. If we need a special setup it is going to make things
>>>> > harder to deal with.
>>>> >
>>>> > Richard.
>>>> >
>>>> > --
>>>> > Richard Quadling
>>>> > Twitter : EE : Zend
>>>> > @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>> >
>>>>
>>>> I'm not getting consistent results. Are the IP <-> Names consistent?
>>>>
>>>> The SoapClient class cannot completely parse the WSDL file. So I can't
>>>> do anything.
>>>>
>>>> --
>>>> Richard Quadling
>>>> Twitter : EE : Zend
>>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>
>>>
>>
>> Very simple ...
>>
>> Â Â Â $client = new SoapClient
>> Â Â Â Â Â Â Â (
>> Â Â Â Â Â Â Â $wsdl,
>> Â Â Â Â Â Â Â array
>> Â Â Â Â Â Â Â Â Â Â Â (
>> Â Â Â Â Â Â Â Â Â Â Â 'encoding' Â=> 'ISO-8859-1',
>> Â Â Â Â Â Â Â Â Â Â Â 'exception' => True,
>> Â Â Â Â Â Â Â Â Â Â Â 'trace' Â Â => True,
>> Â Â Â Â Â Â Â Â Â Â Â )
>> Â Â Â Â Â Â Â );
>>
>> where
>>
>> $wsdl = 'http://84.235.63.38/MTRECEIVER/TSLMTRECEIVER.svc?wsdl';
>>
>> So. Just trying to read the WSDL file. This bombs with the different
>> server names.
>>
>> I've added all 4 servers to my hosts file ...
>>
>> gadm01wsrv01 Â Â84.235.63.38
>> gadm01wsrv02 Â Â84.235.63.38
>> gadm01wsrv03 Â Â84.235.63.38
>> gadm01wsrv04 Â Â84.235.63.38
>>
>> And the error still exists.
>>
>> SOAP-ERROR: Parsing Schema: can't import schema from
>> 'http://gadm01wsrv01/MTRECEIVER/TSLMTRECEIVER.svc?xsd=xsd0'
>>
>>
>>
>>
>> --
>> Richard Quadling
>> Twitter : EE : Zend
>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>
>> --
>> PHP Soap Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/WCF-SOAP-WSDL...-Parsing-Schema%3A-element-error-tp30566452p30594957.html
> Sent from the Php - Soap mailing list archive at Nabble.com.
>
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

That's what I have. Along with any number of others.

Wireshark shows ...

GET /MTRECEIVER/TSLMTRECEIVER.svc?wsdl HTTP/1.1
Host: 84.235.63.38
User-Agent: PHP
Connection: close

HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Wed, 05 Jan 2011 11:22:01 GMT
Connection: close
Content-Length: 23367

<?xml version="1.0" encoding="utf-8"?><wsdl:definitions
name="TSLMTRECEIVER" targetNamespace="http://tempuri.org/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:wsu="http://docs.oasis-....

for the initial request, but then issues when trying to resolve the
server addresses. It seems that server names aren't enough. I'm on a
windows network and it seems that unless there is a proper domain
name, windows assumes I'm trying to do yourserver.mydomain.local and
failing.

Again, using WireShark, I can see "DNS	Standard query A
gadm01wsrv02.MyDomain.LOCAL" and "Name query NB GADM01WSRV02<00>".
Both of which fail to find things. I've turned off the DNS Client
Service and the hosts file is being read for ping/tracert, but there
must be another setting overriding the hosts file.

So, I'm slightly buggered here. Sorry.

Richard.


-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux