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

Re: [soaplite] Re: Element 'xmlProductString' can't be allowed in valid XML message. Died

Expand Messages
  • Duncan Cameron
    ... Not sure what you mean by this - killed on the wire . Have you run with trace or debug to see the content of the SOAP envelope? use SOAP::Lite +trace =
    Message 1 of 10 , Mar 14, 2002
      On 2002-03-14 davidthewatson wrote:
      >--- In soaplite@y..., Jim Dixon <jdd@d...> wrote:
      >> The XML spec reserves all names beginning with [xX][mM][lL] (all
      >> variations of 'xml' ignoring case). It's a violation of the spec
      >> to use element names beginning with xml. The simplest solution is
      >> to change the element name to, perhaps, productString, so that it
      >> doesn't violate the spec.
      >
      >OK, I changed the name of the variable being passed and indeed, I got
      >past that error. However, I'm seeing another problem now. I read in
      >the XML string and pass that to the SOAP method but the SOAP method
      >does not receive the XML string, it receives a null string. I
      >verified this by changing the SOAP method to simply return the
      >string. I assume there's still a parse problem happening with that
      >string but it's not obvious to me on the client side. That is, I've
      >tried reading the string from a file:
      >
      >$file = 'exampleproduct.xml' ;
      >open(INFO, "<$file" ) ;
      >@lines = <INFO> ;
      >close(INFO) ;
      >my $long_line = join("\n", @lines);
      >
      >and I've also tried embedding the xml string in the program:
      >
      >my $productstring = "<?xml version='1.0' encoding='UTF-8'?>... etc.
      >
      >and in both cases, the string prints fine from the client but gets
      >killed on the wire going to the server.

      Not sure what you mean by this - 'killed on the wire'.
      Have you run with trace or debug to see the content of the SOAP
      envelope?
      use SOAP::Lite +trace => qw(all);

      Also, looking at your original email :

      my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
      my $msg = SOAP::Lite->service($product)
      ->validate('somesessionid',$long_line, 'TEXT');

      Are you sure that $product is being assigned correctly?
      SOAP::Lite is fairly restricted in the WSDL that it can handle.

      Regards,
      Duncan Cameron
    • davidthewatson
      ... I meant loosely, Horked up in the SOAP protocol negotiation. Sorry. ... No, I hadn t but with your instructions I did. Here s the output (LONG, sorry
      Message 2 of 10 , Mar 14, 2002
        --- In soaplite@y..., Duncan Cameron <dcameron@b...> wrote:
        > Not sure what you mean by this - 'killed on the wire'.

        I meant loosely, "Horked up in the SOAP protocol negotiation." Sorry.

        > Have you run with trace or debug to see the content of the SOAP
        > envelope?
        > use SOAP::Lite +trace => qw(all);

        No, I hadn't but with your instructions I did. Here's the output
        (LONG, sorry again):

        SOAPAction: "validateImport"

        <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
        ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
        ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-
        ENV:Body><namesp2:validateImport
        xmlns:namesp2="http://tempuri.org/net.metalsite.external.Product"><ses
        sionId xsi:type="xsd:string">8DEC2983-2EEB-93BB-D37C-
        A228897DEC9C</sessionId><ProductString xsi:type="xsd:string"><?xml
        version="1.0" encoding="UTF-8"?><inventory><product
        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:xsd='http://www.w3.org/2001/XMLSchema'
        xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'>
        <PARTNUMBER xsi:type='xsd:string'>bnm</PARTNUMBER> <PWEIGHT
        xsi:type='xsd:string'>2</PWEIGHT> <PADDEDBY
        xsi:type='xsd:string'></PADDEDBY> <PADDEDON
        xsi:type='xsd:string'></PADDEDON> <UOWNERREF
        xsi:type='xsd:string'></UOWNERREF> <UREFITEM
        xsi:type='xsd:string'>16381</UREFITEM> <PBATCHREFITEM
        xsi:type='xsd:string'></PBATCHREFITEM> <PREFITEM
        xsi:type='xsd:string'></PREFITEM> <PWIDTH
        xsi:type='xsd:string'></PWIDTH> <PHEIGHT
        xsi:type='xsd:string'></PHEIGHT> <PDEPTH
        xsi:type='xsd:string'></PDEPTH> <IPRICE
        xsi:type='xsd:string'>2.25</IPRICE> <IQTYAVAIL
        xsi:type='xsd:string'>1</IQTYAVAIL> <IREFITEM
        xsi:type='xsd:string'></IREFITEM> <ISUPPLIERID
        xsi:type='xsd:string'>16381</ISUPPLIERID> <PTYPE
        xsi:type='xsd:string'></PTYPE> <PMANUFACTURER
        xsi:type='xsd:string'></PMANUFACTURER><PMANFPARTNUMBER
        xsi:type='xsd:string'>123-mYnUM</PMANFPARTNUMBER> <PADJMANFPARTNUM
        xsi:type='xsd:string'>123-mYnUM</PADJMANFPARTNUM> <PNAME
        xsi:type='xsd:string'></PNAME> <PDESCRIPTION
        xsi:type='xsd:string'></PDESCRIPTION> <PICTURENAME
        xsi:type='xsd:string'></PICTURENAME> <PURLLINK
        xsi:type='xsd:string'></PURLLINK> <PTECHDESCRIPTION
        xsi:type='xsd:string'></PTECHDESCRIPTION> <PGUAGE
        xsi:type='xsd:string'></PGUAGE> <ZCITY
        xsi:type='xsd:string'></ZCITY> <ZSTATE
        xsi:type='xsd:string'></ZSTATE> <ZIP
        xsi:type='xsd:string'>26032</ZIP> <PQUALITY
        xsi:type='xsd:string'></PQUALITY> <PFINISH
        xsi:type='xsd:string'></PFINISH> <PCOATING
        xsi:type='xsd:string'></PCOATING> <PTREATMENT
        xsi:type='xsd:string'></PTREATMENT> <PBASEWT
        xsi:type='xsd:string'></PBASEWT> <PBASEBOX
        xsi:type='xsd:string'></PBASEBOX> <PTEMPER
        xsi:type='xsd:string'></PTEMPER> <PGRADE
        xsi:type='xsd:string'></PGRADE> <PASTM
        xsi:type='xsd:string'></PASTM> <PINSIDEDIAM
        xsi:type='xsd:string'></PINSIDEDIAM> <POUTSIDEDIAM
        xsi:type='xsd:string'></POUTSIDEDIAM> <PBRANDNAME
        xsi:type='xsd:string'></PBRANDNAME> <RCODEME
        xsi:type='xsd:string'>100</RCODEME> <RSELLERREASON
        xsi:type='xsd:string'></RSELLERREASON> <PEXPIREDAYS
        xsi:type='xsd:string'></PEXPIREDAYS> <PEXPIREDATE
        xsi:type='xsd:string'>20020130</PEXPIREDATE> <UNITOFMEASURE
        xsi:type='xsd:string'>lbs</UNITOFMEASURE> <PLOT
        xsi:type='xsd:string'></PLOT> <DISCNTPERCENT
        xsi:type='xsd:string'></DISCNTPERCENT> <DISCNTQTY
        xsi:type='xsd:string'></DISCNTQTY> <GAUGETYPE
        xsi:type='xsd:string'>n</GAUGETYPE> <PBATCHID
        xsi:type='xsd:string'>01</PBATCHID> <PRIMARY_C
        xsi:type='xsd:string'></PRIMARY_C> <PRIMARY_MN
        xsi:type='xsd:string'></PRIMARY_MN> <PRIMARY_P
        xsi:type='xsd:string'></PRIMARY_P> <PRIMARY_S
        xsi:type='xsd:string'></PRIMARY_S> <PRIMARY_AL
        xsi:type='xsd:string'></PRIMARY_AL> <PRIMARY_SB
        xsi:type='xsd:string'></PRIMARY_SB> <PRIMARY_BE
        xsi:type='xsd:string'></PRIMARY_BE> <PRIMARY_BI
        xsi:type='xsd:string'></PRIMARY_BI> <PRIMARY_B
        xsi:type='xsd:string'></PRIMARY_B> <PRIMARY_CD
        xsi:type='xsd:string'></PRIMARY_CD> <PRIMARY_CA
        xsi:type='xsd:string'></PRIMARY_CA> <PRIMARY_CR
        xsi:type='xsd:string'></PRIMARY_CR> <PRIMARY_CB
        xsi:type='xsd:string'></PRIMARY_CB> <PRIMARY_CU
        xsi:type='xsd:string'></PRIMARY_CU> <PRIMARY_AU
        xsi:type='xsd:string'></PRIMARY_AU> <PRIMARY_FE
        xsi:type='xsd:string'></PRIMARY_FE> <PRIMARY_PB
        xsi:type='xsd:string'></PRIMARY_PB> <PRIMARY_MG
        xsi:type='xsd:string'></PRIMARY_MG> <PRIMARY_MO
        xsi:type='xsd:string'></PRIMARY_MO> <PRIMARY_NI
        xsi:type='xsd:string'></PRIMARY_NI> <PRIMARY_N
        xsi:type='xsd:string'></PRIMARY_N> <PRIMARY_O
        xsi:type='xsd:string'></PRIMARY_O> <PRIMARY_PT
        xsi:type='xsd:string'></PRIMARY_PT> <PRIMARY_SI
        xsi:type='xsd:string'></PRIMARY_SI> <PRIMARY_AG
        xsi:type='xsd:string'></PRIMARY_AG> <PRIMARY_SN
        xsi:type='xsd:string'></PRIMARY_SN> <PRIMARY_TI
        xsi:type='xsd:string'></PRIMARY_TI> <PRIMARY_W
        xsi:type='xsd:string'></PRIMARY_W> <PRIMARY_V
        xsi:type='xsd:string'></PRIMARY_V> <PRIMARY_ZN
        xsi:type='xsd:string'></PRIMARY_ZN> <PRIMARY_ZR
        xsi:type='xsd:string'></PRIMARY_ZR> <TRANS_C
        xsi:type='xsd:string'></TRANS_C> <TRANS_MN
        xsi:type='xsd:string'></TRANS_MN> <TRANS_P
        xsi:type='xsd:string'></TRANS_P> <TRANS_S
        xsi:type='xsd:string'></TRANS_S> <TRANS_AL
        xsi:type='xsd:string'></TRANS_AL> <TRANS_SB
        xsi:type='xsd:string'></TRANS_SB> <TRANS_BE
        xsi:type='xsd:string'></TRANS_BE> <TRANS_BI
        xsi:type='xsd:string'></TRANS_BI> <TRANS_B
        xsi:type='xsd:string'></TRANS_B> <TRANS_CD
        xsi:type='xsd:string'></TRANS_CD> <TRANS_CA
        xsi:type='xsd:string'></TRANS_CA> <TRANS_CR
        xsi:type='xsd:string'></TRANS_CR> <TRANS_CB
        xsi:type='xsd:string'></TRANS_CB> <TRANS_CU
        xsi:type='xsd:string'></TRANS_CU> <TRANS_AU
        xsi:type='xsd:string'></TRANS_AU> <TRANS_FE
        xsi:type='xsd:string'></TRANS_FE> <TRANS_PB
        xsi:type='xsd:string'></TRANS_PB> <TRANS_MG
        xsi:type='xsd:string'></TRANS_MG> <TRANS_MO
        xsi:type='xsd:string'></TRANS_MO> <TRANS_NI
        xsi:type='xsd:string'></TRANS_NI> <TRANS_N
        xsi:type='xsd:string'></TRANS_N> <TRANS_O
        xsi:type='xsd:string'></TRANS_O> <TRANS_PT
        xsi:type='xsd:string'></TRANS_PT> <TRANS_SI
        xsi:type='xsd:string'></TRANS_SI> <TRANS_AG
        xsi:type='xsd:string'></TRANS_AG> <TRANS_SN
        xsi:type='xsd:string'></TRANS_SN> <TRANS_TI
        xsi:type='xsd:string'></TRANS_TI> <TRANS_W
        xsi:type='xsd:string'></TRANS_W> <TRANS_V
        xsi:type='xsd:string'></TRANS_V> <TRANS_ZN
        xsi:type='xsd:string'></TRANS_ZN> <TRANS_ZR
        xsi:type='xsd:string'></TRANS_ZR> <SELLER_PRODUCT_FW_1
        xsi:type='xsd:string'></SELLER_PRODUCT_FW_1> <SELLER_PRODUCT_FW_2
        xsi:type='xsd:string'></SELLER_PRODUCT_FW_2> <SELLER_PRODUCT_FW_3
        xsi:type='xsd:string'></SELLER_PRODUCT_FW_3> <SELLER_PRODUCT_FW_4
        xsi:type='xsd:string'></SELLER_PRODUCT_FW_4> <SELLER_PRODUCT_FW_5
        xsi:type='xsd:string'></SELLER_PRODUCT_FW_5> <PRODUCT_THICKNESS
        xsi:type='xsd:string'></PRODUCT_THICKNESS> <ROLL_WDTH_MIN
        xsi:type='xsd:string'></ROLL_WDTH_MIN> <ROLL_WDTH_MAX
        xsi:type='xsd:string'></ROLL_WDTH_MAX> <ROLL_GAUGE_MIN
        xsi:type='xsd:string'></ROLL_GAUGE_MIN> <ROLL_GAUGE_MAX
        xsi:type='xsd:string'></ROLL_GAUGE_MAX> <PRODUCT_LENGTH
        xsi:type='xsd:string'></PRODUCT_LENGTH> <ROLL_YLD_LOW_EST
        xsi:type='xsd:string'></ROLL_YLD_LOW_EST> <ROLL_YLD_HIGH_EST
        xsi:type='xsd:string'></ROLL_YLD_HIGH_EST> <PRODUCT_HEAT
        xsi:type='xsd:string'></PRODUCT_HEAT> <IMPORT_VERSION
        xsi:type='xsd:string'></IMPORT_VERSION> <IMPORT_DESC
        xsi:type='xsd:string'></IMPORT_DESC> <PROD_CLASS_IND
        xsi:type='xsd:string'>P</PROD_CLASS_IND> <PICKLING
        xsi:type='xsd:string'></PICKLING> <GRADE_TYPE_IND
        xsi:type='xsd:string'>o</GRADE_TYPE_IND> <PRIMARY_O_READING_TYPE
        xsi:type='xsd:string'></PRIMARY_O_READING_TYPE> <PRIMARY_AS
        xsi:type='xsd:string'></PRIMARY_AS> <PRIMARY_CE
        xsi:type='xsd:string'></PRIMARY_CE> <PRIMARY_CO
        xsi:type='xsd:string'></PRIMARY_CO> <PRIMARY_GE
        xsi:type='xsd:string'></PRIMARY_GE> <PRIMARY_H
        xsi:type='xsd:string'></PRIMARY_H> <PRIMARY_H_READING_TYPE
        xsi:type='xsd:string'></PRIMARY_H_READING_TYPE> <PRIMARY_SE
        xsi:type='xsd:string'></PRIMARY_SE> <PRIMARY_TA
        xsi:type='xsd:string'></PRIMARY_TA> <PRIMARY_TE
        xsi:type='xsd:string'></PRIMARY_TE> <SELLER_RSN_DESC
        xsi:type='xsd:string'></SELLER_RSN_DESC> <BUNDLE_YN
        xsi:type='xsd:string'>Y</BUNDLE_YN> <BUNDLE_TYPE_IND
        xsi:type='xsd:string'>S</BUNDLE_TYPE_IND> <BUNDLE_FORM_CD
        xsi:type='xsd:string'>TR</BUNDLE_FORM_CD> <BUNDLE_PIECE_QTY
        xsi:type='xsd:string'>15</BUNDLE_PIECE_QTY> <EDGE_TYPE
        xsi:type='xsd:string'></EDGE_TYPE> <PRODUCT_WIDTH_MIN
        xsi:type='xsd:string'>4</PRODUCT_WIDTH_MIN> <PRODUCT_WIDTH_MAX
        xsi:type='xsd:string'>5.25</PRODUCT_WIDTH_MAX>
        <PRODUCT_THICKNESS_MIN
        xsi:type='xsd:string'></PRODUCT_THICKNESS_MIN>
        <PRODUCT_THICKNESS_MAX
        xsi:type='xsd:string'></PRODUCT_THICKNESS_MAX>
        <PRODUCT_THICKNESS_TYPE
        xsi:type='xsd:string'></PRODUCT_THICKNESS_TYPE> <PRODUCT_LENGTH_MIN
        xsi:type='xsd:string'></PRODUCT_LENGTH_MIN> <PRODUCT_LENGTH_MAX
        xsi:type='xsd:string'></PRODUCT_LENGTH_MAX> <PRODUCT_SPEC_ID
        xsi:type='xsd:string'></PRODUCT_SPEC_ID> <PRODUCT_SPEC_TYPE_CD
        xsi:type='xsd:string'></PRODUCT_SPEC_TYPE_CD> <PLATE_33_MAX_YN
        xsi:type='xsd:string'></PLATE_33_MAX_YN> <STORAGE_LOCATION_IND
        xsi:type='xsd:string'></STORAGE_LOCATION_IND> <DOMESTIC_IMPORT_IND
        xsi:type='xsd:string'></DOMESTIC_IMPORT_IND> <COOLING_TIME_DUR_TOT
        xsi:type='xsd:string'></COOLING_TIME_DUR_TOT>
        <COOLING_TIME_UNIT_MEAS
        xsi:type='xsd:string'></COOLING_TIME_UNIT_MEAS>
        <PRODUCT_CERTIFICATION_AVAIL
        xsi:type='xsd:string'></PRODUCT_CERTIFICATION_AVAIL>
        <PRODUCT_HEAT_TREATMENT
        xsi:type='xsd:string'></PRODUCT_HEAT_TREATMENT> <POSITIONAL_LATITUDE
        xsi:type='xsd:string'></POSITIONAL_LATITUDE> <POSITIONAL_LONGITUDE
        xsi:type='xsd:string'></POSITIONAL_LONGITUDE> <FUTURE_START_DT
        xsi:type='xsd:string'></FUTURE_START_DT> <FUTURE_END_DT
        xsi:type='xsd:string'></FUTURE_END_DT> <UNLIMITED_QTY_YN
        xsi:type='xsd:string'>N</UNLIMITED_QTY_YN> <UNLIMITED_DURATION_YN
        xsi:type='xsd:string'>N</UNLIMITED_DURATION_YN> <PRODUCT_WGT_MIN
        xsi:type='xsd:string'></PRODUCT_WGT_MIN> <PRODUCT_WGT_MAX
        xsi:type='xsd:string'></PRODUCT_WGT_MAX> <PRODUCT_GAUGE_MIN
        xsi:type='xsd:string'>8.5</PRODUCT_GAUGE_MIN> <PRODUCT_GAUGE_MAX
        xsi:type='xsd:string'>9</PRODUCT_GAUGE_MAX> <PRODUCT_DIAMETER
        xsi:type='xsd:string'></PRODUCT_DIAMETER> <PRODUCT_MIN_DIAMETER
        xsi:type='xsd:string'></PRODUCT_MIN_DIAMETER> <PRODUCT_MAX_DIAMETER
        xsi:type='xsd:string'></PRODUCT_MAX_DIAMETER> <PRODUCT_THREAD_YN
        xsi:type='xsd:string'></PRODUCT_THREAD_YN> <PRODUCT_CONDITION
        xsi:type='xsd:string'></PRODUCT_CONDITION> <PRODUCT_CUT_EDGE_TYPE
        xsi:type='xsd:string'></PRODUCT_CUT_EDGE_TYPE> <PRODUCT_HARDENING
        xsi:type='xsd:string'></PRODUCT_HARDENING> <DEOX_TYPE
        xsi:type='xsd:string'></DEOX_TYPE> <MELT_TYPE
        xsi:type='xsd:string'></MELT_TYPE> <THREAD_TYPE
        xsi:type='xsd:string'></THREAD_TYPE> <MECH_PROP_TENSILE
        xsi:type='xsd:string'></MECH_PROP_TENSILE> <MECH_PROP_YLD
        xsi:type='xsd:string'></MECH_PROP_YLD> <MECH_PROP_UOM
        xsi:type='xsd:string'></MECH_PROP_UOM> <MECH_PROP_ELONG_PCT
        xsi:type='xsd:string'></MECH_PROP_ELONG_PCT>
        <MECH_PROP_REDUCTION_PCT
        xsi:type='xsd:string'></MECH_PROP_REDUCTION_PCT> <MECH_PROP_HARDNESS
        xsi:type='xsd:string'></MECH_PROP_HARDNESS> <MECH_PROP_ROCKWELL
        xsi:type='xsd:string'></MECH_PROP_ROCKWELL>
        <MECH_PROP_ROCKWELL_SCALE
        xsi:type='xsd:string'></MECH_PROP_ROCKWELL_SCALE>
        <DISPLAY_RESERVE_PRICE
        xsi:type='xsd:string'></DISPLAY_RESERVE_PRICE> <CREFITEM
        xsi:type='xsd:string'></CREFITEM> <CATALOGREF
        xsi:type='xsd:string'></CATALOGREF> <CATALOG_CD
        xsi:type='xsd:string'>steel</CATALOG_CD> <FORM_CD
        xsi:type='xsd:string'>Coil</FORM_CD> <FAMILY_CD
        xsi:type='xsd:string'>HOT ROLL</FAMILY_CD> <SUB_FAMILY_CD
        xsi:type='xsd:string'>Dry</SUB_FAMILY_CD> <COMMERCE_TYPE
        xsi:type='xsd:string'>A</COMMERCE_TYPE> <errorMsg
        xsi:type='xsd:string'></errorMsg></product></inventory>
        </ProductString><messageType
        xsi:type="xsd:string">TEXT</messageType></namesp2:validateImport></SOA
        P-ENV:Body></SOAP-ENV:Envelope>
        SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH
        (0x842779c)
        SOAP::Transport::HTTP::Client::send_receive: HTTP/1.0 200 OK
        Date: Thu, 14 Mar 2002 20:07:18 GMT
        Server: GLUE/2.1
        Content-Length: 521
        Content-Type: text/xml; charset=UTF-8
        Client-Date: Thu, 14 Mar 2002 20:07:18 GMT
        Client-Peer: 192.168.0.178:8080
        Servlet-Engine: Jetty/3.1 (JSP 1.1; Servlet 2.2; java 1.3.1_02)

        <?xml version='1.0' encoding='UTF-8'?>
        <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:xsd='http://www.w3.org/2001/XMLSchema'
        xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
        xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
        soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><soap:B
        ody><n:validateImportResponse
        xmlns:n='http://tempuri.org/net.metalsite.external.Product'><Result
        xsi:type='xsd:string'></Result></n:validateImportResponse></soap:Body>
        </soap:Envelope>

        > Also, looking at your original email :
        >
        > my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
        > my $msg = SOAP::Lite->service($product)
        > ->validate('somesessionid',$long_line, 'TEXT');
        >
        > Are you sure that $product is being assigned correctly?
        > SOAP::Lite is fairly restricted in the WSDL that it can handle.

        Not sure what you mean by, "assigned correctly". I don't get any WSDL
        parse errors or anything like that. I do wonder whether the type
        negotiation and coercion is correct but I'm not sure I can make an
        informed opinion since I'd need to read the book on perl first. Sigh.

        Thanks,
        David
      • Duncan Cameron
        ... version= 1.0 encoding= UTF-8 ?
        Message 3 of 10 , Mar 14, 2002
          On 2002-03-15 davidthewatson wrote:
          >--- In soaplite@y..., Duncan Cameron <dcameron@b...> wrote:
          >> Not sure what you mean by this - 'killed on the wire'.
          >
          >I meant loosely, "Horked up in the SOAP protocol negotiation." Sorry.
          >
          >> Have you run with trace or debug to see the content of the SOAP
          >> envelope?
          >> use SOAP::Lite +trace => qw(all);
          >
          >No, I hadn't but with your instructions I did. Here's the output
          >(LONG, sorry again):
          >
          >SOAPAction: "validateImport"
          >
          ><?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
          >ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
          >ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
          >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
          >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
          >xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-
          >ENV:Body><namesp2:validateImport
          >xmlns:namesp2="http://tempuri.org/net.metalsite.external.Product"><ses
          >sionId xsi:type="xsd:string">8DEC2983-2EEB-93BB-D37C-
          >A228897DEC9C</sessionId><ProductString xsi:type="xsd:string">
          <?xml >version="1.0" encoding="UTF-8"?><inventory><product
          =======
          . snipped ...
          Well, you've actually got XML embedded as the content of your ProductString
          element, including an XML declaration, which makes the SOAP envelope
          badly-formed.

          I don't understand how SOAP::Lite did this as I thought it automatically
          escaped the <>& characters.
          Try getting rid of the document declaration (the <?xml ..> bit)
          Also, your server should have been complaining about the badly-formed
          envelope.
          >
          >> Also, looking at your original email :
          >>
          >> my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
          >> my $msg = SOAP::Lite->service($product)
          >> ->validate('somesessionid',$long_line, 'TEXT');
          >>
          >> Are you sure that $product is being assigned correctly?
          >> SOAP::Lite is fairly restricted in the WSDL that it can handle.
          >
          >Not sure what you mean by, "assigned correctly". I don't get any WSDL
          >parse errors or anything like that. I do wonder whether the type
          >negotiation and coercion is correct but I'm not sure I can make an
          >informed opinion since I'd need to read the book on perl first. Sigh.

          Sorry, misread the code. I thought it was the result of a method call.

          Regards,
          Duncan Cameron
        • Paul Kulchenko
          Hi, Duncan! ... That s correct. ... SOAP::Lite doesn t do encoding and doesn t validate XML fragments you insert using xml pseudo-type. If it s not the case
          Message 4 of 10 , Mar 18, 2002
            Hi, Duncan!

            > Well, you've actually got XML embedded as the content of your
            > ProductString
            > element, including an XML declaration, which makes the SOAP
            > envelope badly-formed.
            That's correct.

            > I don't understand how SOAP::Lite did this as I thought it
            > automatically escaped the <>& characters.
            SOAP::Lite doesn't do encoding and doesn't validate XML fragments you
            insert using 'xml' pseudo-type. If it's not the case I would like to
            see the client code.

            > Try getting rid of the document declaration (the <?xml ..> bit)
            > Also, your server should have been complaining about the
            > badly-formed envelope.
            Yes. XML declarations are not allowed inside XML messages as far as I
            remember. Processing instructions are not allowed according to SOAP
            spec, but many toolkits just ignore them, but not fail.

            Best wishes, Paul.

            --- Duncan Cameron <dcameron@...> wrote:
            > On 2002-03-15 davidthewatson wrote:
            > >--- In soaplite@y..., Duncan Cameron <dcameron@b...> wrote:
            > >> Not sure what you mean by this - 'killed on the wire'.
            > >
            > >I meant loosely, "Horked up in the SOAP protocol negotiation."
            > Sorry.
            > >
            > >> Have you run with trace or debug to see the content of the SOAP
            > >> envelope?
            > >> use SOAP::Lite +trace => qw(all);
            > >
            > >No, I hadn't but with your instructions I did. Here's the output
            > >(LONG, sorry again):
            > >
            > >SOAPAction: "validateImport"
            > >
            > ><?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
            > xmlns:SOAP-
            > >ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
            > >ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            > >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
            > >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
            > >xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-
            > >ENV:Body><namesp2:validateImport
            >
            >xmlns:namesp2="http://tempuri.org/net.metalsite.external.Product"><ses
            > >sionId xsi:type="xsd:string">8DEC2983-2EEB-93BB-D37C-
            > >A228897DEC9C</sessionId><ProductString xsi:type="xsd:string">
            > <?xml >version="1.0" encoding="UTF-8"?><inventory><product
            > =======
            > . snipped ...
            > Well, you've actually got XML embedded as the content of your
            > ProductString
            > element, including an XML declaration, which makes the SOAP
            > envelope
            > badly-formed.
            >
            > I don't understand how SOAP::Lite did this as I thought it
            > automatically
            > escaped the <>& characters.
            > Try getting rid of the document declaration (the <?xml ..> bit)
            > Also, your server should have been complaining about the
            > badly-formed
            > envelope.
            > >
            > >> Also, looking at your original email :
            > >>
            > >> my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
            > >> my $msg = SOAP::Lite->service($product)
            > >> ->validate('somesessionid',$long_line, 'TEXT');
            > >>
            > >> Are you sure that $product is being assigned correctly?
            > >> SOAP::Lite is fairly restricted in the WSDL that it can handle.
            > >
            > >Not sure what you mean by, "assigned correctly". I don't get any
            > WSDL
            > >parse errors or anything like that. I do wonder whether the type
            > >negotiation and coercion is correct but I'm not sure I can make an
            >
            > >informed opinion since I'd need to read the book on perl first.
            > Sigh.
            >
            > Sorry, misread the code. I thought it was the result of a method
            > call.
            >
            > Regards,
            > Duncan Cameron
            >
            >
            >
            >
            >
            >
            > ------------------------ Yahoo! Groups Sponsor
            >
            > To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to
            > http://docs.yahoo.com/info/terms/
            >
            >


            __________________________________________________
            Do You Yahoo!?
            Yahoo! Sports - live college hoops coverage
            http://sports.yahoo.com/
          • Paul Kulchenko
            Hi, David! ... Just a follow-up. You can force encoding of your XML fragment with this code: my $product = http://192.168.0.170:8080/mws/urn:Product.wsdl ; my
            Message 5 of 10 , Mar 18, 2002
              Hi, David!

              --- Duncan Cameron <dcameron@...> wrote:
              > I don't understand how SOAP::Lite did this as I thought it
              > automatically escaped the <>& characters.

              Just a follow-up. You can force encoding of your XML fragment with
              this code:

              my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
              my $msg = SOAP::Lite->service($product)
              ->validate('somesessionid',
              SOAP::Data->type(string => $long_line),
              'TEXT');

              > >> SOAP::Lite is fairly restricted in the WSDL that it can handle.
              That's the main reason for this effect. Will be fixed.

              Best wishes, Paul.

              __________________________________________________
              Do You Yahoo!?
              Yahoo! Sports - live college hoops coverage
              http://sports.yahoo.com/
            • Paul Kulchenko
              Hi, David! ... That s still a mystery for me. You should get this message ONLY if wsdl file specifies xmlProductString as an element name (which is
              Message 6 of 10 , Mar 18, 2002
                Hi, David!

                > I have deleted a lot of extraneous code for brevity. SOAP::Lite
                > generates this message
                >
                > Element 'xmlProductString' can't be allowed in valid XML message.
                > Died
                That's still a mystery for me. You should get this message ONLY if
                wsdl file specifies "xmlProductString" as an element name (which is
                incorrect), but I can't access the file to verify that. Let me know
                if you see some other reason.

                Best wishes, Paul.

                --- davidthewatson <davidthewatson@...> wrote:
                > I have the following code:
                >
                > use SOAP::Lite;
                > $file = 'data.xml' ;
                > open(INFO, "<$file" ) ;
                > @lines = <INFO> ;
                > close(INFO) ;
                > $long_line = join("\n", @lines);
                > my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
                > my $msg = SOAP::Lite->service($product)->validate
                > ('somesessionid',$long_line, 'TEXT');
                >
                > I have deleted a lot of extraneous code for brevity. SOAP::Lite
                > generates this message
                >
                > Element 'xmlProductString' can't be allowed in valid XML message.
                > Died
                >
                > when making the validate call. The server is running Glue 2.1 from
                > the mind electric. The second parameter where $long_line is being
                > passed is a SOAP string which has embedded XML in it. This works
                > with
                > a variety of clients including java, dotnet(C#), vbscript, etc. I'm
                >
                > not sure why the SOAP::Lite parser doesn't like the embedded XML
                > string. I assume there's a parsing issue with the tags but I'm not
                > sure if it can be escaped or whether there's a call I can make to
                > tell it to treat the string specially.
                >
                > Thanks,
                > David
                >
                >
                > ------------------------ Yahoo! Groups Sponsor
                >
                > To unsubscribe from this group, send an email to:
                > soaplite-unsubscribe@yahoogroups.com
                >
                >
                >
                > Your use of Yahoo! Groups is subject to
                > http://docs.yahoo.com/info/terms/
                >
                >


                __________________________________________________
                Do You Yahoo!?
                Yahoo! Sports - live college hoops coverage
                http://sports.yahoo.com/
              • davidthewatson
                ... Hi Paul: I tried your suggestion above today. It doesn t work either. The end result is that the server receives a null string. I ve also tried removing
                Message 7 of 10 , Mar 21, 2002
                  --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
                  > Just a follow-up. You can force encoding of your XML fragment with
                  > this code:
                  >
                  > my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
                  > my $msg = SOAP::Lite->service($product)
                  > ->validate('somesessionid',
                  > SOAP::Data->type(string => $long_line),
                  > 'TEXT');

                  Hi Paul:

                  I tried your suggestion above today. It doesn't work either. The end
                  result is that the server receives a null string. I've also tried
                  removing the XML declaration from the string being sent. That doesn't
                  solve it either. I also tried a bit of replacement on the (typically
                  escaped) characters. That doesn't seem to do it either. Not sure if
                  there's anything else I should try.

                  Thanks for all of your help.

                  -david
                Your message has been successfully submitted and would be delivered to recipients shortly.