java - Passing a BigInteger parameter in a Soap Webservice -


i'm developing application on wildfly 10, jee. uses soap webservices. i'm thinking of passing in parameter of type biginteger. works ok, i'm not sure if advisable. how biginteger represented in wsdl?

@webmethod(operationname = "myservice") public myresult myservice(             @webparam(name = "param1") biginteger param1)             throws serviceexception {      } 

the exception due fact wrking service uses xsd:integer type represent biginteger while other service uses xsd:int type. 1 can correctly represent bigintegers not other

the following table gives common mappings between java types , serialized xml version

java types xml serialization

picture reference: (ibm knowledge base can see biginteger should serialized xsd:integer. there integer type: xsd:int. used represent signed 32 bits integer, not fit range of biginteger. on other hand xsd:integer representation of unbounded integer value, cover biginteger.

if having these issue might xsd schema derive wsdl types from, can use following type of reference in wsdl file: example in your-wsdl-file.wsdl can add (right after wsdl:definitions tag)

<wsdl:types>     <xsd:schema>          <xsd:import namespace="http://your/namespace/here" schemalocation="your-schemafile.xsd"/>        </xsd:schema> </wsdl:types> 

in xsd can use xsd:integer type force right representation of yur biginteger type.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -