Connectivity test fails

433 views
Skip to first unread message

john.rug...@gmail.com

unread,
Oct 23, 2017, 9:16:59 PM10/23/17
to HL7v2 Immunization Testing
Hi,
I am new to this group. I am trying to do the connectivity test. My request seems to be fine but I get an error response. See request and response below.

2017-10-23 19:47:39,760 INFO org.apache.cxf.services.IISPortTypeService.IIS_PortTypePort.IIS_PortType - Outbound Message
---------------------------
ID: 1
Address: https://hl7v2-iz-r1.5-testing.nist.gov:8098/iztool/ws/iisService
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml; charset=UTF-8
Headers: {Accept=[*/*], SOAPAction=["urn:cdc:iisb:2011:connectivityTest"]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><connectivityTest xmlns="urn:cdc:iisb:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="connectivityTest"><echoBack>Hello IIS!</echoBack></connectivityTest></soap:Body></soap:Envelope>
--------------------------------------
2017-10-23 19:47:39,897 INFO org.apache.cxf.services.IISPortTypeService.IIS_PortTypePort.IIS_PortType - Inbound Message
----------------------------
ID: 1
Response-Code: 500
Encoding: UTF-8
Content-Type: text/html;charset=utf-8
Headers: {Access-Control-Allow-Credentials=[true], Access-Control-Allow-Headers=[Access-Control-Allow-Headers,Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization,appVersion,rsbVersion], Access-Control-Allow-Methods=[GET,HEAD,OPTIONS,POST,PUT], Access-Control-Allow-Origin=[*], Cache-Control=[no-cache, no-store, must-revalidate], connection=[close], Content-Language=[en], content-type=[text/html;charset=utf-8], Date=[Tue, 24 Oct 2017 00:47:39 GMT], Server=[Apache-Coyote/1.1], transfer-encoding=[chunked], X-Content-Type-Options=[nosniff], X-Frame-Options=[SAMEORIGIN], X-XSS-Protection=[1; mode=block]}
Payload: <html><head><title>Apache Tomcat/7.0.64 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Request processing failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Unable to internalize message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Request processing failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Unable to internalize message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Unable to internalize message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

Any help appreciated.
Thanks in advance!
JR

Affo, Harold (Assoc)

unread,
Oct 24, 2017, 9:29:23 AM10/24/17
to john.rug...@gmail.com, HL7v2 Immunization Testing

Hello,

Please make sure your namespace is http://www.w3.org/2003/05/soap-envelope since we support SOAP 1.2 


Thanks 



Harold Affo
 
--------------------------------------------------------------------
The contents of this e-mail and any attachments are intended solely for the use
of the named addressee(s) and may contain confidential and/or privileged
information. Any unauthorized use, copying, disclosure, or distribution of the
contents of this e-mail is strictly prohibited. If you are not the intended
recipient, please notify the sender immediately and delete this email. Thank you.


From: hl7v2-immuniz...@googlegroups.com <hl7v2-immuniz...@googlegroups.com> on behalf of john.rug...@gmail.com <john.rug...@gmail.com>
Sent: Monday, October 23, 2017 9:16:59 PM
To: HL7v2 Immunization Testing
Subject: Connectivity test fails
 
Hi,
  I am new to this group. I am trying to do the connectivity test. My request seems to be fine but I get an error response. See request and response below.

2017-10-23 19:47:39,760 INFO  org.apache.cxf.services.IISPortTypeService.IIS_PortTypePort.IIS_PortType - Outbound Message
---------------------------
ID: 1

Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml; charset=UTF-8
Headers: {Accept=[*/*], SOAPAction=["urn:cdc:iisb:2011:connectivityTest"]}
Payload: <soap:Envelope xmlns:soap="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F&data=02%7C01%7Charold.affo%40nist.gov%7Cf608d845136a42b9b86f08d51a7ced46%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636444046217475746&sdata=jfw6%2FaqAKVypK4ZdyhhAR6bsxbXS9FOT2Dbt9m6D0t0%3D&reserved=0"><soap:Body><connectivityTest xmlns="urn:cdc:iisb:2011" xmlns:xsi="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=02%7C01%7Charold.affo%40nist.gov%7Cf608d845136a42b9b86f08d51a7ced46%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636444046217475746&sdata=DI6kgF%2BGnahM3aQH625DlTtB0p54sqBqGlMYRhL3Djs%3D&reserved=0" xsi:type="connectivityTest"><echoBack>Hello IIS!</echoBack></connectivityTest></soap:Body></soap:Envelope>

--------------------------------------
2017-10-23 19:47:39,897 INFO  org.apache.cxf.services.IISPortTypeService.IIS_PortTypePort.IIS_PortType - Inbound Message
----------------------------
ID: 1
Response-Code: 500
Encoding: UTF-8
Content-Type: text/html;charset=utf-8
Headers: {Access-Control-Allow-Credentials=[true], Access-Control-Allow-Headers=[Access-Control-Allow-Headers,Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization,appVersion,rsbVersion], Access-Control-Allow-Methods=[GET,HEAD,OPTIONS,POST,PUT], Access-Control-Allow-Origin=[*], Cache-Control=[no-cache, no-store, must-revalidate], connection=[close], Content-Language=[en], content-type=[text/html;charset=utf-8], Date=[Tue, 24 Oct 2017 00:47:39 GMT], Server=[Apache-Coyote/1.1], transfer-encoding=[chunked], X-Content-Type-Options=[nosniff], X-Frame-Options=[SAMEORIGIN], X-XSS-Protection=[1; mode=block]}
Payload: <html><head><title>Apache Tomcat/7.0.64 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Request processing failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Unable to internalize message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Request processing failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Unable to internalize message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Unable to internalize message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message

Any help appreciated.
Thanks in advance!
JR

JR

unread,
Oct 24, 2017, 12:24:30 PM10/24/17
to HL7v2 Immunization Testing
I modified my code but I am still receiving the error below. I am generating the code using Apache CXF. I downloaded and passed in the document Harold Affo suggested to Apache wsdl2java which changed the request message, see below. Is there an example Java/Groovy Apache CXF client for interacting with the Immunization Testing service?

New request:
<?xml version="1.0" encoding="utf-8"?>


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>

<connectivityTest xmlns="urn:cdc:iisb:2011" xmlns:ns2="http://www.w3.org/2003/05/soap-envelope">


<echoBack>Hello IIS!</echoBack>
</connectivityTest>
</soap:Body>
</soap:Envelope>

New Response:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for HTML5 for Mac OS X version 5.4.0" />


<title>Apache Tomcat/7.0.64 - Error report</title>
<style>

<![CDATA[


<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}-->
]]>
</style>
</head>
<body>
<h1>HTTP Status 500 - Request processing failed; nested exception is
org.springframework.ws.soap.SoapMessageCreationException: Could not create message from
InputStream: Unable to internalize message; nested exception is
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message</h1>

<hr size="1" noshade="noshade" />


<p><b>type</b> Exception report</p>
<p><b>message</b> <u>Request processing failed; nested exception is
org.springframework.ws.soap.SoapMessageCreationException: Could not create message from
InputStream: Unable to internalize message; nested exception is
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message</u></p>
<p><b>description</b> <u>The server encountered an internal error that prevented it from
fulfilling this request.</u></p>

<p><b>exception</b></p>
<pre>
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Unable to internalize message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message</pre>
</body>
</html>

Affo, Harold (Assoc)

unread,
Oct 24, 2017, 1:51:14 PM10/24/17
to JR, HL7v2 Immunization Testing

John, 

I don't have any example code.  Have you try using a soap client such as Boomerang which is a chrome plugin ?  


Harold Affo
 
--------------------------------------------------------------------
The contents of this e-mail and any attachments are intended solely for the use
of the named addressee(s) and may contain confidential and/or privileged
information. Any unauthorized use, copying, disclosure, or distribution of the
contents of this e-mail is strictly prohibited. If you are not the intended
recipient, please notify the sender immediately and delete this email. Thank you.


From: hl7v2-immuniz...@googlegroups.com <hl7v2-immuniz...@googlegroups.com> on behalf of JR <john.rug...@gmail.com>
Sent: Tuesday, October 24, 2017 12:24:30 PM
To: HL7v2 Immunization Testing
Subject: Re: Connectivity test fails
 
I modified my code but I am still receiving the error below. I am generating the code using Apache CXF. I downloaded and passed in the document Harold Affo suggested to Apache wsdl2java which changed the request message, see below. Is there an example Java/Groovy Apache CXF client for interacting with the Immunization Testing service?

New request:
<?xml version="1.0" encoding="utf-8"?>

                        <echoBack>Hello IIS!</echoBack>
                </connectivityTest>
        </soap:Body>
</soap:Envelope>

New Response:
<!DOCTYPE html>
--
You received this message because you are subscribed to the Google Groups "HL7v2 Immunization Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hl7v2-immunization-...@googlegroups.com.

JR

unread,
Oct 24, 2017, 3:13:24 PM10/24/17
to HL7v2 Immunization Testing
>I don't have any example code. Have you try using a soap client such as Boomerang which is a chrome plugin ?
No I have not tried using Boomerang. I am a developer and I am trying to integrate our system with the IIS of one of our clients. My plan is to query the IIS for upcoming immunizations and present those to our client. It's all backend server side code. We use the Grails webstack which is based on the JVM and the Groovy language. We cannot use any browser specific code and in some scenerios no browser is involved. Do anyone see anything wrong with the SOAP message I posted?

JR

JR

unread,
Oct 24, 2017, 6:01:07 PM10/24/17
to HL7v2 Immunization Testing
I tested posting the message using the curl command. The first message uses namespace soap and the second message does not use a namespace. The message with namespace soap fails while the message with no namespace works. Did SOAP 1.2 not support namespaces? All the SOAP message examples I saw on the WC3 website show the messages containing the soap namespace. Below are the two curl tests and the results.

curl --header "Content-Type: application/soap+xml;charset=UTF-8" --header "SOAPAction:urn:cdc:iisb:2011:connectivityTest" --data @request1.xml https://hl7v2-iz-r1.5-testing.nist.gov:8098/iztool/ws/iisService > response1.txt

<!-- input file request1.xml -->


<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>

<connectivityTest xmlns="urn:cdc:iisb:2011" xmlns:ns2="http://www.w3.org/2003/05/soap-envelope">


<echoBack>Hello IIS!</echoBack>
</connectivityTest>
</soap:Body>
</soap:Envelope>

Response error:
org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: InputStream does not represent a valid SOAP 1.2 Message; nested exception is javax.xml.soap.SOAPException: InputStream does not represent a valid SOAP 1.2 Message

curl --header "Content-Type: application/soap+xml;charset=UTF-8" --header "SOAPAction:urn:cdc:iisb:2011:connectivityTest" --data @request2.xml https://hl7v2-iz-r1.5-testing.nist.gov:8098/iztool/ws/iisService > response2.txt

<!-- input file request2.xml -->


<?xml version="1.0" encoding="utf-8"?>

<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
<Body>


<connectivityTest xmlns="urn:cdc:iisb:2011" xmlns:ns2="http://www.w3.org/2003/05/soap-envelope">

<echoBack>Hello IIS V2!</echoBack>
</connectivityTest>
</Body>
</Envelope>

<?xml version="1.0" encoding="utf-8"?>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header/>
<env:Body>
<ns2:connectivityTestResponse xmlns:ns2="urn:cdc:iisb:2011">
<ns2:return>Hello IIS V2!</ns2:return>
</ns2:connectivityTestResponse>
</env:Body>
</env:Envelope>

I am not sure why the message without the namespace works and the other with the namespace does not work. If anyone can explain why, it would be greatly appreciated.

Affo, Harold (Assoc)

unread,
Oct 25, 2017, 10:19:06 AM10/25/17
to JR, HL7v2 Immunization Testing

John, 

It seems the error is in the soap namespace.  Instead of https it should be http. 

The "Soap Envelope" tab can help identify the issues in the soap message.   

See screenshots.  

 

Hope it helps.



Harold Affo
 
--------------------------------------------------------------------
The contents of this e-mail and any attachments are intended solely for the use
of the named addressee(s) and may contain confidential and/or privileged
information. Any unauthorized use, copying, disclosure, or distribution of the
contents of this e-mail is strictly prohibited. If you are not the intended
recipient, please notify the sender immediately and delete this email. Thank you.

Sent: Tuesday, October 24, 2017 6:01:07 PM

To: HL7v2 Immunization Testing
Subject: Re: Connectivity test fails
I tested posting the message using the curl command. The first message uses namespace soap and the second message does not use a namespace. The message with namespace soap fails while the message with no namespace works. Did SOAP 1.2 not support namespaces? All the SOAP message examples I saw on the WC3 website show the messages containing the soap namespace. Below are the two curl tests and the results.



<!-- input file request1.xml -->
<?xml version="1.0" encoding="utf-8"?>

                        <echoBack>Hello IIS!</echoBack>
                </connectivityTest>
        </soap:Body>
</soap:Envelope>

Response error:
org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: InputStream does not represent a valid SOAP 1.2 Message; nested exception is javax.xml.soap.SOAPException: InputStream does not represent a valid SOAP 1.2 Message



<!-- input file request2.xml -->
<?xml version="1.0" encoding="utf-8"?>

                        <echoBack>Hello IIS V2!</echoBack>
                </connectivityTest>
        </Body>
</Envelope>

<?xml version="1.0" encoding="utf-8"?>

        <env:Header/>
        <env:Body>
                <ns2:connectivityTestResponse xmlns:ns2="urn:cdc:iisb:2011">
                        <ns2:return>Hello IIS V2!</ns2:return>
                </ns2:connectivityTestResponse>
        </env:Body>
</env:Envelope>

I am not sure why the message without the namespace works and the other with the namespace does not work. If anyone can explain why, it would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups "HL7v2 Immunization Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hl7v2-immunization-...@googlegroups.com.
Screen Shot 2017-10-25 at 10.15.36 AM.png
Screen Shot 2017-10-25 at 10.15.49 AM.png

JR

unread,
Oct 26, 2017, 7:28:30 PM10/26/17
to HL7v2 Immunization Testing
Harold thanks! After doing some debugging I discovered that you are correct the namespace was incorrect. The Grails plugin I am using sets the default SOAP version to 1.1. I needed to change a property in the plugin settings to change the default to SOAP 1.2. After making the change I was able to successfully run the connectivity test.

I am now working on creating VXQ^V01 messages to continue testing.

Thanks again!
JR

Reply all
Reply to author
Forward
0 new messages