Loading ...
Sorry, an error occurred while loading the content.

6121Re: [soaplite] Re: re:Question about complex types

Expand Messages
  • Peter Hartmann
    Mar 28, 2008
    • 0 Attachment
      Hello Brian,

      Brian wrote:
      > I am having the same problem (now four years after Mr. Sedgley).
      > does anyone know how to remove the encodingStyle attribute from the
      > envelope or an alternative solution?

      you can do that by setting the encodingStyle to an empty string, like this:

      ---
      my $obj = SOAP::Lite->service('http://<url>.wsdl');
      $obj->encodingStyle('');
      my $result = ...
      ---


      Peter



      I am not sure but I think the
      > server is running .NET. I am using SOAP::Lite 0.69 on Windows XP. I
      > also tried using version 0.71 on Ubuntu with no success.
      >
      > Here is the actual fault string:
      >
      > cvc-complex-type.3.2.2: Attribute 'soap:encodingStyle' is not allowed
      > to appear in element 'soap:Envelope'.
      >
      > Here is the perl code:
      >
      > use warnings;
      > use SOAP::Lite;
      >
      > my $obj = SOAP::Lite->service('https://<url>.wsdl');
      >
      > my $result = $obj->servicemethodcall('data');
      >
      > my $som = $obj->call;
      >
      > if ($som->fault) {
      > print $som->fault->{'faultstring'};
      > } else {
      > print $result;
      > }
      >
      > Brian (not Sedgley)
      >
      > --- In soaplite@yahoogroups.com, Brian Sedgley <bsedgley@...> wrote:
      >> No it is complaining about the fact that the Message is being sent.
      > I do not have control of the soap server and i think it is running
      > sax2 . I would agree that it would be nice if it ignored the message
      > according to the version of Schema they are using
      > http://www.w3.org/2001/06/soap-envelope and look under complex type
      > "encodingStyle" is not included as a valid selection as part of the
      > env.(maybe I am reading it wrong) also ran it through XMLspy and it
      > also complained about the fact that "encodingStyle" is in the envlope
      > for a complex type. here is the response that is given in raw xml form.
      >> <SOAP-ENV:Envelope
      > xmlns:SOAP-ENV="SOAP-ENV:Clientcvc-complex-type.3.2.2'
      > target=_blank>http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>cvc-complex-type.3.2.2:
      > Attribute 'SOAP-ENV:encodingStyle' is not allowed to appear in element
      > 'SOAP-ENV:Envelope'.</faultstring><detail><axl:Error
      > xmlns:axl="5001cvc-complex-type.3.2.2'
      > target=_blank>http://www.cisco.com/AXL/1.0"><axl:code>5001</axl:code><axl:message>cvc-complex-type.3.2.2:
      > Attribute 'SOAP-ENV:encodingStyle' is not allowed to appear in element
      > 'SOAP-ENV:Envelope'.</axl:message></axl:Error></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
      >> But the long and short of it is I need to make this work and I can't
      > change the server side.
      >> Please let me know if there is a solution
      >>
      >> Thanks
      >>
      >> Brian
      >>
      >>
      >> Byrne Reese <byrne@...> wrote:
      >> Not currently.
      >>
      >> I am surprised that your SOAP client is complaining, as it is a
      >> perfectly legitimate attribute to have in a SOAP message. What client
      >> are you using?
      >>
      >> Are you sure it is complaining about the element's presence in the
      >> message, or its value?
      >>
      >> Brian Sedgley wrote:
      >>
      >>> I have went searched the mailer for the solution for this problem I
      >>> have seen other people ask this question but have not seen the answer.
      >>> The request I am makeing is of a complex type. When ever I get a
      > soap
      >>> fault it always complains about the 'SOAP-ENV:encodingStyle' being in
      >>> the soap message. Complex type messages should not enclude encoding
      >>> style at least according to the schema I am working with. is
      > there an
      >>> easy way to get rid of encoding style?
      >>> thanks
      >>> Brian
      >>>
      >>>
      >>> use SOAP::Lite;
      >>> use XML::Simple;
      >>> use Data::Dumper;
      >>> $result = SOAP::Lite ->new() -> outputxml(1)
      >>> -> uri('http<servername>/PerlScripts/axl/axlsoap.xsd')
      >>> -> proxy('https://XXXX:XXXXX@<servername>8443/axl/listener')
      >>> -> getPhone(SOAP::Data->name('phoneName' => "SEP00070ef73adf"));
      >>>
      >>>
      >>> my $config = XMLin($result,KeyAttr =>'');
      >>> print Dumper($return{'SOAP-ENV:Body'}->{ 'axl:getPhoneResponse'
      >>> }->{'return'});
      >>
      >>
      >> Yahoo! Groups Sponsor
      >> Get unlimited calls to
      >>
      >> U.S./Canada
      >>
      >>
      >> ---------------------------------
      >> Yahoo! Groups Links
      >>
      >> To visit your group on the web, go to:
      >> http://groups.yahoo.com/group/soaplite/
      >>
      >> To unsubscribe from this group, send an email to:
      >> soaplite-unsubscribe@yahoogroups.com
      >>
      >> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >>
      >>
      >>
      >> The HTML graphics in this message have been displayed. [Edit
      > Preferences - What's This?]
      >
      >
      >
    • Show all 8 messages in this topic