Re: [Xml-compile] MessageId in soap header

2018-02-14 Thread micunek
Yes you are right. I had to do changes to wsdl.

Thanks
Peter M.

On Wed, Feb 14, 2018 at 3:20 PM, Mark Overmeer  wrote:
> * micu...@gmail.com (micu...@gmail.com) [180213 14:05]:
>> I have another problem. Soap response have different order of tags
>> than is defined in vendor wsdl.
>
> Ouch... it is not unusual that the servers do not validate their messages.
>
> Schema's are very strict: either the message is exactly correct, or the
> message is invalid.  There are many situations where the reader cannot
> automatically recover from mistakes.
>
>> error: decode error: data for element or block starting with `BRPC'
>> missing at tns:LST_ODBResponse/Result/ResultData/Table1/Item
>
> There are a few mistakes which can cause this error.  Your order problem,
> but also missing required elements, type validation errors, etc.
>>
>> Is it possible somehow ignore order or I need rewrite the wsdl?
>> BR, Peter M.
>
> Maybe the version of your WSDL is not the same as the server is using.
> You may also contact the author to get his opinion about who is to
> blame ;-)
>
> When the element order is not maintained, then there might be more wrong
> with the structure of the messages... brace for impact!
>
> When you change  blocks for  blocks, then you may be
> saved (no guarantees)
> --
> Good luck (you need it)
>
>MarkOv
>
> 
>Mark Overmeer MScMARKOV Solutions
>m...@overmeer.net  soluti...@overmeer.net
> http://Mark.Overmeer.net   http://solutions.overmeer.net
>

___
Xml-compile mailing list
Xml-compile@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile


Re: [Xml-compile] MessageId in soap header

2018-02-14 Thread Mark Overmeer
* micu...@gmail.com (micu...@gmail.com) [180213 14:05]:
> I have another problem. Soap response have different order of tags
> than is defined in vendor wsdl.

Ouch... it is not unusual that the servers do not validate their messages.

Schema's are very strict: either the message is exactly correct, or the
message is invalid.  There are many situations where the reader cannot
automatically recover from mistakes.

> error: decode error: data for element or block starting with `BRPC'
> missing at tns:LST_ODBResponse/Result/ResultData/Table1/Item

There are a few mistakes which can cause this error.  Your order problem,
but also missing required elements, type validation errors, etc.
> 
> Is it possible somehow ignore order or I need rewrite the wsdl?
> BR, Peter M.

Maybe the version of your WSDL is not the same as the server is using.
You may also contact the author to get his opinion about who is to
blame ;-)

When the element order is not maintained, then there might be more wrong
with the structure of the messages... brace for impact!

When you change  blocks for  blocks, then you may be
saved (no guarantees)
-- 
Good luck (you need it)

   MarkOv


   Mark Overmeer MScMARKOV Solutions
   m...@overmeer.net  soluti...@overmeer.net
http://Mark.Overmeer.net   http://solutions.overmeer.net


___
Xml-compile mailing list
Xml-compile@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile


Re: [Xml-compile] MessageId in soap header

2018-02-13 Thread micunek
Mark,
thanks a lot MessageID works.

I have another problem. Soap response have different order of tags
than is defined in vendor wsdl.

error: decode error: data for element or block starting with `BRPC'
missing at tns:LST_ODBResponse/Result/ResultData/Table1/Item

Is it possible somehow ignore order or I need rewrite the wsdl?

BR, Peter M.


On Tue, Feb 13, 2018 at 10:26 AM, Mark Overmeer  wrote:
> * micu...@gmail.com (micu...@gmail.com) [180213 09:24]:
>> could you please help me with a creation of proper soap request?
>> I can not add parameter MessageID as part of soap header.
>
> Did you install/load/read XML::Compile::SOAP::WSA?
> --
> Success,
>MarkOv
>
> 
>Mark Overmeer MScMARKOV Solutions
>m...@overmeer.net  soluti...@overmeer.net
> http://Mark.Overmeer.net   http://solutions.overmeer.net
>

___
Xml-compile mailing list
Xml-compile@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile


Re: [Xml-compile] MessageId in soap header

2018-02-13 Thread Mark Overmeer
* micu...@gmail.com (micu...@gmail.com) [180213 09:24]:
> could you please help me with a creation of proper soap request?
> I can not add parameter MessageID as part of soap header.

Did you install/load/read XML::Compile::SOAP::WSA?
-- 
Success,
   MarkOv


   Mark Overmeer MScMARKOV Solutions
   m...@overmeer.net  soluti...@overmeer.net
http://Mark.Overmeer.net   http://solutions.overmeer.net


___
Xml-compile mailing list
Xml-compile@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile


[Xml-compile] MessageId in soap header

2018-02-13 Thread micunek
Hi,
could you please help me with a creation of proper soap request?
I can not add parameter MessageID as part of soap header.

I tried $wsdl->explain('LST_ODB', PERL => 'INPUT', recurse => 1)  but
it did not help me much.

# Header part 'parameters' is element tns:Authentication
my $parameters = {};

# Header part 'parameters' is element tns:MEName
my $parameters = {};

# Header part 'parameters' is element tns:MessageID
my $parameters = {};

# Body part 'parameters' is element tns:LST_ODB
my $parameters = {};

# Call with the combination of parts.
my @params = (
parameters => $parameters,
parameters => $parameters,
parameters => $parameters,
parameters => $parameters,
);

$parameters =
# Describing simple tns:MessageID
# {http://www.operatordomain.com/IMS/MMVoLTEAS/}MessageID
# xmlns:tns   http://www.operatordomain.com/IMS/MMVoLTEAS/
# xmlns:xshttp://www.w3.org/2001/XMLSchema

# is a xs:string
# length <= 128
# length >= 1
"example"


Here is part of my code:

my $call = $wsdl->compileClient(
operation => 'LST_ODB',
);

my ($answer, $trace) = $call->(

   IMPU => 'sip:+421xxx...@ims.mnc003.mcc231.3gppnetwork.org',

   parameters => {
   Username => 'user',
   Password => 'pass',
   },

   MEName => 'MMTelAS_1',
   MessageID => '123',
);

Output:

mistake: unused tags MEName MessageID at tns:LST_ODB
 at /usr/local/share/perl5/XML/Compile/Translate/Writer.pm line 532
trace: received 200 OK
trace: using preparsed XML document with element
<{http://schemas.xmlsoap.org/soap/envelope/}Envelope>
trace: using preparsed XML node
<{http://www.operatordomain.com/IMS/MMVoLTEAS/}MessageID>
Request:
  POST http://10.55.63.2:3001/IMS/VoLTEAS/ HTTP/1.1

  
  http://schemas.xmlsoap.org/soap/envelope/";>http://www.operatordomain.com/IMS/MMVoLTEAS/";>userpasshttp://www.operatordomain.com/IMS/MMVoLTEAS/";>sip:+421...@ims.mnc003.mcc231.3gppnetwork.org

Response:

  http://schemas.xmlsoap.org/soap/envelope/";
xmlns:tns="http://www.operatordomain.com/IMS/MMVoLTEAS/";>0sip:+421xxx...@ims.mnc003.mcc231.3gppnetwork.orgOperation
succeeded000

error: decode error: string `' does not have minimum length 1 at
tns:MessageID#facet
Errors while decoding:
  trace: using preparsed XML document with element
<{http://schemas.xmlsoap.org/soap/envelope/}Envelope>
  trace: using preparsed XML node
<{http://www.operatordomain.com/IMS/MMVoLTEAS/}MessageID>
  error: decode error: string `' does not have minimum length 1 at
tns:MessageID#facet

___
Xml-compile mailing list
Xml-compile@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile