Topic
  • 1 reply
  • Latest Post - ‏2012-11-15T14:54:44Z by scott_klement
SystemAdmin
SystemAdmin
535 Posts

Pinned topic IBM i - Webservice Server

‏2012-11-14T21:27:47Z |
Hello,

I am trying to use the IBM i web service server and i have deployed the default service provided QSYSDIR/QIWSSAMPLE temperature conversion program. I am using SOAP to test it, but not sure i am getting an error.

My SOAP request is
================================================
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://ajservice2.wsbeans.iseries/xsd">
<soapenv:Header/>
<soapenv:Body>
<xsd:converttemp>
<!--Optional:-->
<xsd:param0>
<!--Optional:-->
<xsd:_TEMPIN>100</xsd:_TEMPIN>
<!--Optional:-->
<xsd:_TEMPOUT>0</xsd:_TEMPOUT>
</xsd:param0>
</xsd:converttemp>
</soapenv:Body>
</soapenv:Envelope>
==============================================
The response i am getting is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>java.lang.RuntimeException: Invocation of program failed.
AS400Message (ID: RNX0105 text: A character representation of a numeric value is in error.):com.ibm.as400.access.AS400Message@11421142</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
========================================

What is that i am missing,

WDSL is

==================================
<?xml version="1.0" encoding="UTF-8" ?>
  • <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://ajservice2.wsbeans.iseries" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://ajservice2.wsbeans.iseries/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ajservice2.wsbeans.iseries">
<wsdl:documentation>AJSERVICE2</wsdl:documentation>
  • <wsdl:types>
  • <xs:schema xmlns:ns="http://ajservice2.wsbeans.iseries/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ajservice2.wsbeans.iseries/xsd">
  • <xs:element name="converttemp">
  • <xs:complexType>
  • <xs:sequence>
<xs:element minOccurs="0" name="param0" nillable="true" type="ns:CONVERTTEMPInput" />
</xs:sequence>
</xs:complexType>
</xs:element>
  • <xs:complexType name="CONVERTTEMPInput">
  • <xs:sequence>
<xs:element minOccurs="0" name="_TEMPIN" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="_TEMPOUT" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
  • <xs:element name="converttempResponse">
  • <xs:complexType>
  • <xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ns:CONVERTTEMPResult" />
</xs:sequence>
</xs:complexType>
</xs:element>
  • <xs:complexType name="CONVERTTEMPResult">
  • <xs:sequence>
<xs:element minOccurs="0" name="_TEMPOUT" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
  • <xs:element name="converttemp_XML">
  • <xs:complexType>
  • <xs:sequence>
<xs:element minOccurs="0" name="param0" nillable="true" type="ns:CONVERTTEMPInput" />
</xs:sequence>
</xs:complexType>
</xs:element>
  • <xs:element name="converttemp_XMLResponse">
  • <xs:complexType>
  • <xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
  • <wsdl:message name="converttempRequest">
<wsdl:part name="parameters" element="ns0:converttemp" />
</wsdl:message>
  • <wsdl:message name="converttempResponse">
<wsdl:part name="parameters" element="ns0:converttempResponse" />
</wsdl:message>
  • <wsdl:message name="converttemp_XMLRequest">
<wsdl:part name="parameters" element="ns0:converttemp_XML" />
</wsdl:message>
  • <wsdl:message name="converttemp_XMLResponse">
<wsdl:part name="parameters" element="ns0:converttemp_XMLResponse" />
</wsdl:message>
  • <wsdl:portType name="AJSERVICE2PortType">
  • <wsdl:operation name="converttemp">
<wsdl:input message="axis2:converttempRequest" wsaw:Action="urn:converttemp" />
<wsdl:output message="axis2:converttempResponse" wsaw:Action="urn:converttempResponse" />
</wsdl:operation>
  • <wsdl:operation name="converttemp_XML">
<wsdl:input message="axis2:converttemp_XMLRequest" wsaw:Action="urn:converttemp_XML" />
<wsdl:output message="axis2:converttemp_XMLResponse" wsaw:Action="urn:converttemp_XMLResponse" />
</wsdl:operation>
</wsdl:portType>
  • <wsdl:binding name="AJSERVICE2SOAP11Binding" type="axis2:AJSERVICE2PortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
  • <wsdl:operation name="converttemp">
<soap:operation soapAction="urn:converttemp" style="document" />
  • <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
  • <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
  • <wsdl:operation name="converttemp_XML">
<soap:operation soapAction="urn:converttemp_XML" style="document" />
  • <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
  • <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
  • <wsdl:service name="AJSERVICE2">
  • <wsdl:port name="AJSERVICE2SOAP11port_http" binding="axis2:AJSERVICE2SOAP11Binding">
<soap:address location="http://myibmi:10015/web/services/AJSERVICE2" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
====================
Updated on 2012-11-15T14:54:44Z at 2012-11-15T14:54:44Z by scott_klement
  • scott_klement
    scott_klement
    245 Posts

    Re: IBM i - Webservice Server

    ‏2012-11-15T14:54:44Z  
    Hi Ajay,

    I notice that the error mesage says "RNX0105 text: A character representation of a numeric value is in error."

    an RNX message is an RPG message -- so this error is occuring within your RPG program, causing the program to crash, most likely... and then the web services server is telling the caller about it.