Get MalformedByteSequenceException from Polarion TrackerWebService

Description
nkdesmond
Posts: 1
Joined: Mon Sep 30, 2019 1:10 pm

Get MalformedByteSequenceException from Polarion TrackerWebService

Postby nkdesmond » Mon Sep 30, 2019 1:26 pm

Hello Guys. I am using Polarion 2016 SR3 integrated with Teamcenter 10. However I am not able to send web service request to Polarion with chinese characters in its parameters. Polarion will response with MalformedByteSequenceException if I do so.
My request be like:

Code: Select all

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
  <SOAP-ENV:Header>
    <ns2:sessionID xmlns:ns2="http://ws.polarion.com/session">-6004290866559367700</ns2:sessionID>
  </SOAP-ENV:Header> 
  <SOAP-ENV:Body>
    <ns1:addLinkedOslcItem xmlns:ns1="http://ws.polarion.com/TrackerWebService-impl"> 
      <ns1:workitemURI>subterra:data-service:objects:/default/elibrary${WorkItem}EL-198</ns1:workitemURI> 
      <ns1:linkedOslcItemURI>http://bjevvm:7001/lis/oslc/cm/BO?uid=w2V1Z86MZwiRRD</ns1:linkedOslcItemURI> 
      <ns1:role xmlns:ns3="http://ws.polarion.com/TrackerWebService-types">
        <ns3:id>http://open-services.net/ns/cm#relatedChangeRequest</ns3:id>
      </ns1:role> 
      <ns1:label>测试</ns1:label>
    </ns1:addLinkedOslcItem>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


and response from Polarion be like:

Code: Select all

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>soapenv:Server.userException</faultcode>
      <faultstring>com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:Invalid byte 1 of 1-byte UTF-8 sequence.</faultstring>
      <detail>
        <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">POLARIONVM</ns1:hostname>
      </detail>
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>


Since this is an OOTB feature from Teamcenter Connector. I cannot modify how I send the request.
Does anyone know how to configure Polarion 2016 SR3 for web service encoding issue?

Regards
Desmond

Jürgen
Posts: 96
Joined: Tue Sep 12, 2017 1:02 pm

Re: Get MalformedByteSequenceException from Polarion TrackerWebService

Postby Jürgen » Tue Oct 01, 2019 12:21 pm

I don't know if there is a configuration switch for that, but it seems that your XML message might be wrongly encoded.

The error message basically says that the XML should be UTF-8, but some symbol in there is not coded in UTF-8. At least that is what google tells me when I search for the error message.


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: Google [Bot] and 9 guests