Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://cleverbssopenhubframework.cleverlance.comorg/ws/Common-v1" xmlns:hel="http://cleverbusopenhubframework.cleverlance.comorg/ws/HelloService-v1">
   <soapenv:Header>
      <com:traceHeader>
         <com:traceIdentifier>
            <com:applicationID>APPL001</com:applicationID>
            <com:timestamp>2013-05-21T10:33:58.147+02:00</com:timestamp>
            <com:correlationID>${=java.util.UUID.randomUUID()}</com:correlationID>
            <!--Optional:-->
            <com:processID>process001</com:processID>
         </com:traceIdentifier>
      </com:traceHeader>
   </soapenv:Header>
   <soapenv:Body>
      <hel:asyncHelloRequest>
         <hel:name>CleverBus team</hel:name>
      </hel:asyncHelloRequest>
   </soapenv:Body>
</soapenv:Envelope>

Validation of trace identifier from trace header

...

It's good practice to use validation functionality of allowed values in applicationID. This value is used for example in GUI Admin, auto confirmation delegation etc. For that we only have to register custom implementation of ExternalSystemIdentifierValidator interface. We can have an unlimited number of these implementations.

...

Code Block
languagexml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Server</faultcode>
         <faultstring xml:lang="en">
				E120: the trace identifier does not contain allowed values (ValidationIntegrationException: the trace identifier 
				'applicationID=ERP,timestamp=2013-09-27T10:23:34.698+02:00,correlationID=da793349-b486-489a-9180-200789b7007f,processID=process123' is not allowed)
         </faultstring>
         <detail>
            <errorCode xmlns="http://cleverbusopenhubframework.cleverlance.comorg">E120</errorCode>
         </detail>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

...

Code Block
languagexml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <asyncHelloResponse xmlns="http://cleverbusopenhubframework.cleverlance.comorg/ws/HelloService-v1" xmlns:ns2="http://cleverbssopenhubframework.cleverlance.comorg/ws/Common-v1">
         <confirmAsyncHello>
            <ns2:status>FAIL</ns2:status>
            <ns2:additionalInfo>
				E120: the trace identifier does not contain allowed values (ValidationIntegrationException: the trace identifier 
				'applicationID=ERP,timestamp=2013-09-27T10:23:34.698+02:00,correlationID=da793349-b486-489a-9180-200789b7007f,processID=process123' is not allowed)
			</ns2:additionalInfo>
         </confirmAsyncHello>
      </asyncHelloResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

...

Code Block
languagexml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <asyncHelloResponse xmlns="http://cleverbusopenhubframework.cleverlance.comorg/ws/HelloService-v1" xmlns:ns2="http://cleverbssopenhubframework.cleverlance.comorg/ws/Common-v1">
         <confirmAsyncHello>
            <ns2:status>OK</ns2:status>
         </confirmAsyncHello>
      </asyncHelloResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

...

Code Block
languagexml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <asyncHelloResponse xmlns="http://cleverbusopenhubframework.cleverlance.comorg/ws/HelloService-v1" xmlns:ns2="http://cleverbssopenhubframework.cleverlance.comorg/ws/Common-v1">
         <confirmAsyncHello>
            <ns2:status>FAIL</ns2:status>
            <ns2:additionalInfo>E106: error during saving asynchronous message into storage (RuntimeException: some error)</ns2:additionalInfo>
         </confirmAsyncHello>
      </asyncHelloResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

...

Code Block
languagexml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Server</faultcode>
         <faultstring xml:lang="en">E117: Access is denied - there is no required authorization role (AccessDeniedException: Access is denied)</faultstring>
         <detail>
            <errorCode xmlns="http://cleverbusopenhubframework.cleverlance.comorg">E117</errorCode>
         </detail>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

...