in reply to WebService client with SOAP::Lite and ComplexType

The WSDL would seem to indicate that you want to use PublishRequestMessage rather than PublishRequest and brokerMessage rather than BrokerMessage so you need to change your client to have:

my $request_obj = PublishRequestType->new ({ PublishRequestMessage => { brokerMessage => { destinationName +=> 'blogs', textPayload => 'TES +T' }} });
and also change the OBJ_FIELDS in PublishRequestType.pm and BrokerMessageType_inner.pm to reflect the change.

/J\

Replies are listed 'Best First'.
Re^2: WebService client with SOAP::Lite and ComplexType
by EDevil (Acolyte) on Jul 05, 2006 at 10:44 UTC
    Thanks for the reply. I did exactly what you said but the problem remains. The request_obj->as_xml_data became:
    <?xml version="1.0" encoding="UTF-8"?> <SOAP:ENV xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <namesp1:PublishRequestMessage xmlns:namesp1="http://services.mydoma +in.org/broker" xsi:type="ns1:PublishRequestMessage"> <namesp2:brokerMessage xsi:type="ns1:brokerMessage" xmlns:namesp2= +"http://services.mydomain.org/broker"> <destinationName xsi:type="xsd:string">blogs</destinationName> <textPayload xsi:type="xsd:string">TEST</textPayload> </namesp2:brokerMessage> </namesp1:PublishRequestMessage> </SOAP:ENV>
    But running the client produces the same result:
    Type 'PublishRequest' can't be found in a schema class 'SOAP::Serializ +er'
    The <Body> tag is also missing... Any thoughts?

      Can you set use SOAP::Lite +trace => qw(debug); in the client and give us the entire output? The SOAP envelope I'm seeing here is different to what you have above and it's rather difficult not having the service you are using to test with.

      /J\

        I already have debug activated. The whole output really is:
        lj@huge:~$ ./complex.pl document/literal support is EXPERIMENTAL in SOAP::Lite at /usr/local/s +hare/perl/5.8.7/SOAP/Lite.pm line 2818. Type 'PublishRequest' can't be found in a schema class 'SOAP::Serializ +er' lj@huge:~$
          A reply falls below the community's threshold of quality. You may see it by logging in.