In your Web Service is "Character_Field_1" defined right after "Class"?
The error is saying that is does not expect to see the element Character_Field_1 immediately after the Class element MessageType: 2 MessageNum: 8962 MessageText: Unexpected element encountered in the input XML document AppendedText: <Character_Field_1> Fred ________________________________ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Marc Simmons Sent: Thursday, July 12, 2007 2:25 PM To: [email protected] Subject: Re: Web Services, OpCreate and Perl OH MY ** Thanks for the quick response Fred, but I'm still getting errors. Here's the source: use SOAP::Lite trace=>'all' ; my $header = SOAP::Header->name('AuthenticationInfo' => \SOAP::Header->value( SOAP::Header->name('userName' => $username)->type(''), SOAP::Header->name('password' => $password)->type(''), SOAP::Header->name('authentication' => $authentication)->type(''), SOAP::Header->name('locale' => $locale)->type(''), SOAP::Header->name('timeZone' => $timeZone)->type(''), ) ); my $soap = new SOAP::Lite proxy=>$proxy, uri=>$uri ; my $result=$soap->OpCreate( $header, SOAP::Data->name('Class' => "$class"), SOAP::Data->name('Character_Field_1' => "$Character_Field_1"), ); that generates this trace <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ " xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "> <SOAP-ENV:Header> <AuthenticationInfo> <userName>USER</userName> <password>PASSWORD</password> <authentication/> <locale/> <timeZone/> </AuthenticationInfo> </SOAP-ENV:Header> <SOAP-ENV:Body> <namesp1:OpCreate xmlns:namesp1="Create_MVSTEST_Form_ImportPortType"> <Class xsi:type="xsd:string">Base1</Class> <Character_Field_1 xsi:type="xsd:string">Field 1</Character_Field_1> </namesp1:OpCreate></SOAP-ENV:Body></SOAP-ENV:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x1d612e4) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error Connection: close Date: Thu, 12 Jul 2007 19:06:25 GMT Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Client-Date: Thu, 12 Jul 2007 19:06:25 GMT Client-Peer: 192.168.75.51:8080 Client-Response-Num: 1 Set-Cookie: JSESSIONID=9D74856F2C01B6DE32A21E33A1652CCB; Path=/arsys <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmln s:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSc hema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring> MessageType: 2 MessageNum: 8962 MessageText: Unexpected element encountered in the input XML document AppendedText: <Character_Field_1></faultstring> <detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope> SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () SOAP::SOM::new: () Fault : MessageType: 2 MessageNum: 8962 MessageText: Unexpected element encountered in the input XML document AppendedText: <Character_Field_1> Faultcode :soapenv:Server.userException Faultdetail : On 7/12/07, Grooms, Frederick W <[EMAIL PROTECTED]> wrote: ** Use a comma between elements my $som = $soap->OpCreate( SOAP::Data->name('String_1' => 'a1'), SOAP::Data->type('xsd:string')->name('String_2' => 'a2'), SOAP::Data->name('String_5' => 'a5') ); Here is a link to the SOAP::Lite docs: http://search.cpan.org/~byrne/SOAP-Lite-0.69/lib/SOAP/Data.pm Fred ________________________________ From: Action Request System discussion list(ARSList) [mailto:[email protected] ] On Behalf Of Marc Simmons Sent: Thursday, July 12, 2007 1:20 PM To: [email protected] Subject: Web Services, OpCreate and Perl OH MY Hi List, I hate to bring up this subject yet again, but I can't seem to find a complete answer in most of the postings I've read. I've created a form with a web service that uses the OpCreate method. I've had some success consuming the web service using perl, but have not figured out how to build a SOAP::Data structure that contains more than 1 field and value: ie my $data = SOAP::Data->name('Class')->value($class)->type('xsd:string'); Any advice for consuming a web service that contains more than one field in the data would be greatly appreciated. Thanks, -- Marc Simmons Remedy Administrator "Everyday above ground is a good day... the rest is a choice!" __20060125_______________________This posting was submitted with HTML in it___ -- Marc Simmons Remedy Administrator "Everyday above ground is a good day... the rest is a choice!" _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"

