You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by divakar <di...@india.altair.com> on 2007/10/22 08:44:45 UTC
Loading CA certificate failed.
Hi All,
I am writing client to access https.NET server service . I got
an error Loading CA certificate failed. How can spcify Client
certificate chain file. I got the certificate from .NET server for
authrization . I am sending axis.xml ,log file and my program. Please
look int and give suggestions.
Thanks And Regards
Divakar
Loading CA certificate failed.
Posted by divakar <di...@india.altair.com>.
Hi All ,
I am also sending Client policy.xml file. Please refere.....
Thanks
Divakar
divakar wrote:
> Hi All,
> I am writing client to access https.NET server service . I
> got an error Loading CA certificate failed. How can spcify Client
> certificate chain file. I got the certificate from .NET server for
> authrization . I am sending axis.xml ,log file and my program. Please
> look int and give suggestions.
>
> Thanks And Regards
> Divakar
>
>------------------------------------------------------------------------
>
><axisconfig name="Axis2/C">
> <!-- ================================================= -->
> <!-- Parameters -->
> <!-- ================================================= -->
> <!-- Uncomment following to enable MTOM support -->
> <!--parameter name="enableMTOM" locked="false">true</parameter-->
> <parameter name="hotdeployment" locked="false">false</parameter>
> <parameter name="hotupdate" locked="false">false</parameter>
> <!--parameter name="enableMTOM" locked="false">true</parameter-->
> <!-- Uncomment this to enable REST support -->
> <parameter name="enableREST" locked="false">true</parameter>
>
>
> <parameter name="userName" locked="false">pbsgridworks\\administrator</parameter>
> <parameter name="password" locked="false">dummy@786</parameter>
>
> <parameter name="seralizeLocation" locked="false">.</parameter>
>
> <!-- Uncomment following to persist op_ctx, useful with RM -->
> <!--parameter name="persistOperationContext" locked="false">true</parameter-->
>
> <!--if you want to extract the service archive file and work with that please uncomment this-->
> <!--else , it wont extract archive file or does not take into consideration if someone drop-->
> <!--exploded directory into /service directory-->
> <!--<parameter name="extractServiceArchive" locked="false">true</parameter>-->
>
>
> <!-- ================================================= -->
> <!-- Message Receivers -->
> <!-- ================================================= -->
> <!-- This is the Deafult Message Receiver for the Request Response style Operations -->
> <!--messageReceiver mep="INOUT" class="axis2_receivers"/-->
>
> <!-- ================================================= -->
> <!-- Transport Ins -->
> <!-- ================================================= -->
> <transportReceiver name="http" class="axis2_http_receiver">
> <parameter name="port" locked="false">6060</parameter>
> </transportReceiver>
> <!--transportReceiver name="tcp" class="axis2_tcp_receiver">
> <parameter name="port" locked="false">6060</parameter>
> </transportReceiver-->
>
>
> <!-- ================================================= -->
> <!-- Transport Outs -->
> <!-- ================================================= -->
>
> <!--transportSender name="http" class="axis2_http_sender">
> <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
> <parameter name="Transfer-Encoding">chunked</parameter-->
> <!--parameter name="PROXY" proxy_host="127.0.0.1" proxy_port="8080" locked="true"/>
> </transportSender-->
> <!-- Uncomment this one with the appropriate papameters to enable the XMPP transport Sender-->
> <!--transportSender name="xmpp" class="axis2_xmpp_sender">
> <parameter name="PROTOCOL" locked="false">XMPP</parameter>
> </transportSender-->
> <!-- Uncomment this one with the appropriate papameters to enable the TCP transport Sender-->
> <!--transportSender name="tcp" class="axis2_tcp_sender">
> <parameter name="PROTOCOL" locked="false">TCP</parameter>
> </transportSender-->
>
>
> <transportSender name="https" class="axis2_http_sender">
> <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
> </transportSender>
> <parameter name="SERVER_CERT">/home/divakar/cert.pem</parameter>
> <!--parameter name="KEY_FILE">/home/divakar/cert.pem</parameter-->
> <!--parameter name="SSL_PASSPHRASE">passphrase</parameter-->
>
>
>
> <!-- ================================================= -->
> <!-- Global Modules -->
> <!-- ================================================= -->alla#div
>
> <!-- Comment this to disable Addressing -->
> <module ref="addressing"/>
> <module ref ="rampart"/>
>
> <!--Configuring module , providing paramters for modules whether they refer or not-->
> <!--<moduleConfig name="addressing">-->
> <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
> <!--</moduleConfig>-->
>
> <!-- ================================================= -->
> <!-- Phases -->
> <!-- ================================================= -->
> <parameter name="OutflowSecurityPolicy">/usr/local/axis2c/examples/client-policy.xml</parameter>
> <parameter name="InflowSecurityPolicy">/home/divakar/Desktop/untitled\ folder/rampartc/samples/secpolicy/scenario1/client-incoming-secpolicy.xml</parameter>
> <phaseOrder type="inflow">
> <!-- System pre defined phases -->
> <phase name="Transport"/>
> <phase name="PreDispatch"/>
> <phase name="Dispatch"/>
> <phase name="PostDispatch"/>
> <!-- End system pre defined phases -->
> <!-- After PostDispatch phase, module or service author can add any phase as required -->
> <!-- User defined phases could be added here -->
> <!--phase name="userphase1"/-->
> <!--phase name="RMPhase"/-->
> <!--phase name="SavanPhase"/-->
> </phaseOrder>
> <phaseOrder type="outflow">
> <!-- User defined phases could be added here -->
> <!--phase name="RMPhase"/-->
> <!--phase name="SavanPhase"/-->
> <!--phase name="userphase1"/-->
> <!--system predefined phase-->
> <phase name="MessageOut"/>
> <phase name="Security"/>
> </phaseOrder>
> <phaseOrder type="INfaultflow">
> <!-- User defined phases could be added here -->
> <!--phase name="userphase1"/-->
> <!--phase name="RMPhase"/-->
> <!--phase name="SavanPhase"/-->
> </phaseOrder>
> <phaseOrder type="Outfaultflow">
> <!-- User defined phases could be added here -->
> <!--phase name="RMPhase"/-->
> <!--phase name="SavanPhase"/-->
> <!--phase name="userphase1"/-->
> <phase name="MessageOut"/>
> </phaseOrder>
></axisconfig>
>
>
>
>------------------------------------------------------------------------
>
>
>[Mon Oct 22 12:04:30 2007] [debug] phase.c(116) axis2_handler_t *request_uri_based_dispatcher added to the index 0 of the phase Transport
>[Mon Oct 22 12:04:30 2007] [debug] phase.c(116) axis2_handler_t *addressing_based_dispatcher added to the index 1 of the phase Transport
>[Mon Oct 22 12:04:30 2007] [debug] phase.c(116) axis2_handler_t *soap_message_body_based_dispatcher added to the index 0 of the phase Dispatch
>[Mon Oct 22 12:04:30 2007] [debug] phase.c(116) axis2_handler_t *soap_action_based_dispatcher added to the index 2 of the phase Dispatch
>[Mon Oct 22 12:04:30 2007] [debug] phase.c(116) axis2_handler_t *dispatch_post_conditions_evaluator added to the index 0 of the phase PostDispatch
>[Mon Oct 22 12:04:30 2007] [debug] phase.c(116) axis2_handler_t *context_handler added to the index 1 of the phase PostDispatch
>[Mon Oct 22 12:04:30 2007] [debug] conf_builder.c(220) no custom dispatching order found continue with default dispatching order
>[Mon Oct 22 12:04:30 2007] [debug] conf_builder.c(326) module addressing found in axis2.xml
>[Mon Oct 22 12:04:30 2007] [debug] conf_builder.c(326) module rampart found in axis2.xml
>[Mon Oct 22 12:04:30 2007] [debug] conf_builder.c(672) Transport name:https
>[Mon Oct 22 12:04:30 2007] [debug] class_loader.c(135) Object loaded successfully
>[Mon Oct 22 12:04:30 2007] [debug] class_loader.c(135) Object loaded successfully
>[Mon Oct 22 12:04:30 2007] [debug] dep_engine.c(1042) axis2_dep_engine_load_module_dll: DLL path is : /usr/local/axis2c/modules/addressing/libaxis2_mod_addr.so
>[Mon Oct 22 12:04:30 2007] [debug] class_loader.c(135) Object loaded successfully
>[Mon Oct 22 12:04:30 2007] [debug] dep_engine.c(1042) axis2_dep_engine_load_module_dll: DLL path is : /usr/local/axis2c/modules/logging/libaxis2_mod_log.so
>[Mon Oct 22 12:04:30 2007] [debug] class_loader.c(135) Object loaded successfully
>[Mon Oct 22 12:04:30 2007] [debug] dep_engine.c(1042) axis2_dep_engine_load_module_dll: DLL path is : /usr/local/axis2c/modules/rampart/libmod_rampart.so
>[Mon Oct 22 12:04:30 2007] [debug] class_loader.c(135) Object loaded successfully
>[Mon Oct 22 12:04:30 2007] [debug] svc_builder.c(292) DLL path is : /usr/local/axis2c/services/sec_echo/libsec_echo.so
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(1253) Start:axis2_phase_resolver_engage_module_to_svc
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(1257) Module rampart will be engaged to sec_echo
>[Mon Oct 22 12:04:30 2007] [debug] svc.c(713) Start:axis2_svc_add_module_ops
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(117) Service name is : sec_echo
>[Mon Oct 22 12:04:30 2007] [debug] svc.c(790) End:axis2_svc_add_module_ops
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartInHandler to phase PreDispatch
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartOutHandler to phase Security
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(1328) End:axis2_phase_resolver_engage_module_to_svc
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(117) Service name is : sec_echo
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingInHandler to phase Transport
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(885) svc name is:sec_echo
>[Mon Oct 22 12:04:30 2007] [debug] svc.c(713) Start:axis2_svc_add_module_ops
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(117) Service name is : sec_echo
>[Mon Oct 22 12:04:30 2007] [debug] svc.c(790) End:axis2_svc_add_module_ops
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(952) Operation name is : CreateActivity
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartInHandler to phase PreDispatch
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(885) svc name is:sec_echo
>[Mon Oct 22 12:04:30 2007] [debug] svc.c(713) Start:axis2_svc_add_module_ops
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(117) Service name is : sec_echo
>[Mon Oct 22 12:04:30 2007] [debug] svc.c(790) End:axis2_svc_add_module_ops
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(952) Operation name is : CreateActivity
>[Mon Oct 22 12:04:30 2007] [info] [rampart][mod_rampart] mod_rampart initialized
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(117) Service name is : __ANONYMOUS_SERVICE__
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(323) This handler is trying to added to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(323) This handler is trying to added to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartOutHandler to phase Security
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(323) This handler is trying to added to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(323) This handler is trying to added to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartOutHandler to phase Security
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(323) This handler is trying to added to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(323) This handler is trying to added to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartOutHandler to phase Security
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:addressing
>[Mon Oct 22 12:04:30 2007] [debug] phase_resolver.c(230) module name is:rampart
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler AddressingOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase_holder.c(129) Add handler RampartOutHandler to phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] op_client.c(817) Start:axis2_op_client_infer_transport
>[Mon Oct 22 12:04:30 2007] [debug] op_client.c(872) End:axis2_op_client_infer_transport
>[Mon Oct 22 12:04:30 2007] [debug] engine.c(654) Start:axis2_engine_invoke_phases
>[Mon Oct 22 12:04:30 2007] [debug] engine.c(667) Invoking phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] phase.c(198) Invoke the handler AddressingOutHandler within the phase MessageOut
>[Mon Oct 22 12:04:30 2007] [debug] engine.c(667) Invoking phase Security
>[Mon Oct 22 12:04:30 2007] [debug] phase.c(198) Invoke the handler RampartOutHandler within the phase Security
>[Mon Oct 22 12:04:30 2007] [info] [rampart][rampart_handler_utils] 0 parameter is not set.
>[Mon Oct 22 12:04:30 2007] [debug] rampart_util.c(54) [rampart][rampart_util] Trying to load module = /usr/local/axis2c/bin/samples/rampart/callback/libpwcb.so
>[Mon Oct 22 12:04:30 2007] [debug] class_loader.c(135) Object loaded successfully
>[Mon Oct 22 12:04:30 2007] [info] [rampart][shb] Using asymmetric binding
>[Mon Oct 22 12:04:30 2007] [info] [rampart][shb] building Timestamp Token
>[Mon Oct 22 12:04:30 2007] [info] [rampart][shb] Using default timeToLive value 300
>[Mon Oct 22 12:04:30 2007] [info] [rampart][shb] building UsernmaeToken
>[Mon Oct 22 12:04:30 2007] [info] [rampart][rampart_util] Password taken from the callback module . SUCCESS
>[Mon Oct 22 12:04:30 2007] [info] [rampart][rampart_context] Including the body.
>[Mon Oct 22 12:04:30 2007] [info] [rampart][rampart_util] Password taken from the callback module . SUCCESS
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Security for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Timestamp for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Expires for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node UsernameToken for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Username for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Password for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Nonce for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptedKey for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [info] [rampart][rampart_context] Including the body.
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Security for Timestamp
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Timestamp for Timestamp
>[Mon Oct 22 12:04:30 2007] [info] [rampart][rampart_util] Password taken from the callback module . SUCCESS
>[Mon Oct 22 12:04:30 2007] [debug] transforms_factory.c(48) [rampart][c14n-OutPut] is
>
><wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SigID-d7f55962-8068-1dc1">https://altair-winccss0.pbsgridworks/HPCBasicProfile/HPCBasicProfile.svc</wsa:To>
>
>
>[Mon Oct 22 12:04:30 2007] [debug] transforms_factory.c(48) [rampart][c14n-OutPut] is
>
><wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SigID-d7f55ba6-8068-1dc1">http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetFactoryAttributesDocument</wsa:Action>
>
>
>[Mon Oct 22 12:04:30 2007] [debug] transforms_factory.c(48) [rampart][c14n-OutPut] is
>
><wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SigID-d7f55c46-8068-1dc1">d7f3833a-8068-1dc1-3aa5-001320ea281b</wsa:MessageID>
>
>
>[Mon Oct 22 12:04:30 2007] [debug] transforms_factory.c(48) [rampart][c14n-OutPut] is
>
><soapenv:Body xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SigID-d7f55cd2-8068-1dc1"><xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Id="EncDataID-d7f3c00c-8068-1dc1" Type="http://www.w3.org/2001/04/xmlenc#Element"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"></xenc:EncryptionMethod><xenc:CipherData><xenc:CipherValue>eM9Lh46bQdgNnt0NQkcgkjDkN5YTf/eyeRtBN5EKeYrauxm/4n168XQXra1wldo2A3+/R552FiPzF/SmpXMiYJT3yvhw+01F9I0k+MS+L/aTWlJBHZm6U6WSh8OetkDKQcqLxWLfyKLX6CG9IjPHi9IBO4yl37Wvpf5shUw4S1vt75Tlatkk0Fpl8W+GYfYBDwhh+GQDm846UvbKpCalOPqNmZsn2+UxPHIJGfU02ZHAYThLfYVbYO3sMUnDUvf2DtAiKyCkdMkGZAfxFpAbgEubirtDVmPcZUnUUscy/waPjty+H4lLDPfqq5taB2NhJ4+M+rzc8UvMhXOx9Lb7W+EDHwN1LAFxjjgAeSMMLO3GIezFYmy1hfVQqDp/FTdFYapMrPKw9l66STzdYfuCOjYBtMuJBq8A/x5MXrEb+y6KYmZC0W6MV2ia7BDyaDz41oz8GmXzT2EEQw0Ri0jf5w==</xenc:CipherValue></xenc:CipherData><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:Reference URI="#EncKeyID-d7f54454-8068-1dc1"></wsse:Reference></wsse:SecurityTokenReference></ds:KeyInfo></xenc:EncryptedData></soapenv:Body>
>
>
>[Mon Oct 22 12:04:30 2007] [debug] transforms_factory.c(48) [rampart][c14n-OutPut] is
>
><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SigID-d7f55d5e-8068-1dc1"><wsu:Created>2007-10-22T06:34:30.230Z</wsu:Created><wsu:Expires>2007-10-22T06:40:30.230Z</wsu:Expires></wsu:Timestamp>
>
>
>[Mon Oct 22 12:04:30 2007] [debug] xml_signature.c(212) [oxs][xml_sig] C14N (sig)= <ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference URI="#SigID-d7f55962-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>AZE7qHlVVDkIkpX7vpmEPvLnYLk=</ds:DigestValue></ds:Reference><ds:Reference URI="#SigID-d7f55ba6-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>FeBWN61Pm9Bebr5d+FXR+NjsJ1s=</ds:DigestValue></ds:Reference><ds:Reference URI="#SigID-d7f55c46-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>LGcocPCFvbDF7kZ8j5YrXvqJjSQ=</ds:DigestValue></ds:Reference><ds:Reference URI="#SigID-d7f55cd2-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>l5YdTSUGBNTe4YdpuwtT5iaYtQ4=</ds:DigestValue></ds:Reference><ds:Reference URI="#SigID-d7f55d5e-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>aXqYPVXyH1xfpS72peZ3aLedsCE=</ds:DigestValue></ds:Reference></ds:SignedInfo>
>[Mon Oct 22 12:04:30 2007] [info] [openssl][sig] Signing content <ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference URI="#SigID-d7f55962-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>AZE7qHlVVDkIkpX7vpmEPvLnYLk=</ds:DigestValue></ds:Reference><ds:Reference URI="#SigID-d7f55ba6-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>FeBWN61Pm9Bebr5d+FXR+NjsJ1s=</ds:DigestValue></ds:Reference><ds:Reference URI="#SigID-d7f55c46-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>LGcocPCFvbDF7kZ8j5YrXvqJjSQ=</ds:DigestValue></ds:Reference><ds:Reference URI="#SigID-d7f55cd2-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>l5YdTSUGBNTe4YdpuwtT5iaYtQ4=</ds:DigestValue></ds:Reference><ds:Reference URI="#SigID-d7f55d5e-8068-1dc1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>aXqYPVXyH1xfpS72peZ3aLedsCE=</ds:DigestValue></ds:Reference></ds:SignedInfo>
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Security for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node BinarySecurityToken for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Timestamp for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Expires for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node UsernameToken for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Username for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Password for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Nonce for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptedKey for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptionMethod for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node KeyInfo for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node SecurityTokenReference for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node KeyIdentifier for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node CipherData for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node CipherValue for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node ReferenceList for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node DataReference for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Signature for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Security for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node BinarySecurityToken for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Timestamp for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Expires for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node UsernameToken for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Username for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Password for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Nonce for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptedKey for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Security for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node BinarySecurityToken for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Timestamp for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Expires for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node UsernameToken for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Username for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Password for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Nonce for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptedKey for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptionMethod for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node KeyInfo for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node SecurityTokenReference for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node KeyIdentifier for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node CipherData for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node CipherValue for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node ReferenceList for ReferenceList
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Security for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node BinarySecurityToken for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Timestamp for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Expires for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node UsernameToken for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Username for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Password for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Nonce for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptedKey for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptionMethod for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node KeyInfo for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node SecurityTokenReference for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node KeyIdentifier for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node CipherData for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node CipherValue for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node ReferenceList for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node DataReference for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptedData for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptionMethod for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node CipherData for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node CipherValue for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node ReferenceList for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node DataReference for Signature
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Security for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node BinarySecurityToken for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Timestamp for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Expires for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node UsernameToken for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Username for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Password for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Nonce for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node Created for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] axiom.c(108) [rampart][axiom] Checking node EncryptedKey for EncryptedKey
>[Mon Oct 22 12:04:30 2007] [debug] engine.c(677) End:axis2_engine_invoke_phases
>[Mon Oct 22 12:04:30 2007] [info] [ssl client] Client certificate chain file not specified
>[Mon Oct 22 12:04:30 2007] [error] ssl/ssl_utils.c(102) [ssl client] Loading CA certificate failed
>[Mon Oct 22 12:04:30 2007] [debug] http_client.c(408) [axis2c] client data stream null or socket error
>[Mon Oct 22 12:04:30 2007] [error] http_sender.c(652) status_code < 0
>[Mon Oct 22 12:04:30 2007] [debug] http_transport_sender.c(571) OP name axutil_qname_get_localpart = http://www.w3.org/2004/08/wsdl/out-in
>[Mon Oct 22 12:04:30 2007] [error] getattribute.c(349) Stub invoke FAILED: Error code: 82 :: Input stream is NULL in msg_ctx
>[Mon Oct 22 12:04:30 2007] [debug] arch_file_data.c(153) Service name :sec_echo
>[Mon Oct 22 12:04:30 2007] [info] [rampart][mod_rampart] mod_rampart shutdown
>
>
>------------------------------------------------------------------------
>
>#include <axiom.h>
>#include <axis2_util.h>
>#include <axutil_env.h>
>#include <axutil_log_default.h>
>#include <axutil_error_default.h>
>#include <axiom_output.h>
>#include <axiom_xml_writer.h>
>#include <stdio.h>
>#include <axis2_client.h>
>#include <axiom_soap.h>
>#include <axiom_soap_envelope.h>
>
>#include <axiom_soap_envelope.h>
>
>
>axiom_node_t *getHeaderNode(const axutil_env_t *env)
>{
> /* Namespace element declarations */
>
> axiom_namespace_t *wsa_ns= NULL;
> axiom_namespace_t *wsse_ns=NULL;
> axiom_namespace_t *wsu_ns=NULL;
>
> axiom_node_t *header_node=NULL,*to_node=NULL,*action_node=NULL;
> axiom_element_t *header_element=NULL,*to_element=NULL,*action_element=NULL;
>
> axiom_text_t *om_text=NULL;
> axiom_node_t *text_node=NULL;
> axiom_node_t *security_node=NULL,*usernametoken_node=NULL,*username_node=NULL,*password_node=NULL;
> axiom_element_t *security_element=NULL,*usernametoken_element=NULL,*username_element=NULL,*password_element=NULL;
> axiom_attribute_t *password_attribute=NULL,*body_attribute=NULL,*to_attribute=NULL;
>
> /* Creating all the namespace elements */
>
> wsa_ns= axiom_namespace_create(env,"http://www.w3.org/2005/08/addressing","wsa");
> wsse_ns=axiom_namespace_create(env,"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","wsse");
> wsu_ns=axiom_namespace_create(env,"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd","wsu");
>
> /* SOAP Header element */
> header_element=axiom_element_create(env,NULL,"Header",NULL,&header_node);
> security_element=axiom_element_create(env,NULL,"Security",wsse_ns,&security_node);
>
> /* Usernametoken element to pass the username, password to HPCPwebservice */
>
> usernametoken_element=axiom_element_create(env,NULL,"UsernameToken",wsse_ns,&usernametoken_node);
> axiom_element_set_namespace(usernametoken_element,env,wsse_ns,usernametoken_node);
> username_element=axiom_element_create(env,NULL,"Username",wsse_ns,&username_node);
> om_text=axiom_text_create(env,username_node,"PBSGRIDWORKS\\administrator",&text_node);
> password_element=axiom_element_create(env,NULL,"Password",wsse_ns,&password_node);
> password_attribute=axiom_attribute_create(env,"Type","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText",NULL);
> axiom_element_add_attribute(password_element,env,password_attribute,password_node);
> om_text=axiom_text_create(env,password_node,"dummy@786",&text_node);
> axiom_node_add_child(usernametoken_node,env,username_node);
> axiom_node_add_child(usernametoken_node,env,password_node);
> axiom_node_add_child(security_node,env,usernametoken_node);
>
> /* End of Usernametoken element */
>
> /*
>
> action_element=axiom_element_create(env,NULL,"Action",wsa_ns,&action_node);
> om_text=axiom_text_create(env,action_node,"http://schemas.ggf.org/bes/2006/08/bes-factory/CreateActivity",&text_node);
> axiom_node_add_child(header_node,env,action_node);
>
>
> to_element=axiom_element_create(env,NULL,"To",wsa_ns,&to_node);
> to_attribute=axiom_attribute_create(env,"mustUnderstand","1",NULL);
> axiom_element_add_attribute(to_element,env,to_attribute,to_node);
> om_text=axiom_text_create(env,to_node,"http://OpenSuSe10:8081",&text_node);
>
> axiom_node_add_child(header_node,env,to_node);
> */
>
> axis2_char_t *om_str=NULL;
> om_str = axiom_node_to_string(security_node,env);
> if(om_str)
> {
> printf("\n Header Element : %s\n", om_str);
> AXIS2_FREE(env->allocator, om_str);
> }
>
>
>
> return security_node;
>}
>
>axiom_node_t *ToElement(const axutil_env_t *env)
>{
> axiom_namespace_t *wsa_ns=NULL;
> axiom_node_t *to_node=NULL;
> axiom_element_t *to_element=NULL;
> axiom_attribute_t *to_attribute=NULL;
> axiom_node_t *text_node=NULL;
> wsa_ns= axiom_namespace_create(env,"http://www.w3.org/2005/08/addressing","wsa");
> to_element=axiom_element_create(env,NULL,"To",wsa_ns,&to_node);
> to_attribute=axiom_attribute_create(env,"mustUnderstand","1",NULL);
> axiom_element_add_attribute(to_element,env,to_attribute,to_node);
> axiom_text_t *om_text=axiom_text_create(env,to_node,"http://www.murali.com/BESFactory",&text_node);
> axis2_char_t *om_str = axiom_node_to_string(to_node,env);
> if(om_str)
> {
> printf("\n To Element : %s\n", om_str);
> AXIS2_FREE(env->allocator, om_str);
> }
> return to_node;
>}
>
>
>
>
>axiom_node_t* convertPBSToJSDL(const axutil_env_t *env)
>{
>
>
> /* Namespace element declarations */
>
> axiom_namespace_t *jsdl_ns = NULL;
> axiom_namespace_t *bes_factory_ns= NULL;
> axiom_namespace_t *hpcp_ns=NULL;
> axiom_namespace_t *xml_ns=NULL;
>
> axiom_text_t *om_text=NULL;
> axiom_node_t *text_node=NULL;
>
> /* Body elements */
>
>
> axiom_node_t *createactivity_node=NULL,*activity_node=NULL;
> axiom_element_t *createactivity_element=NULL,*activity_element=NULL;
>
> /* JSDL document element declarations */
>
> axiom_node_t *jobdefinition_node=NULL,*jobidentification_node=NULL,*jobdescription_node=NULL,*jobname_node=NULL;
> axiom_element_t *jobdefinition_element=NULL,*jobidentification_element=NULL,*jobdescription_element=NULL,*jobname_element=NULL;
>
> /* HPCP - Application profile element declarations */
> axiom_node_t *application_node=NULL,*applicationname_node=NULL,*executable_node=NULL,*stdout_node=NULL,*stderr_node=NULL,*working_node=NULL;
> axiom_element_t *application_element=NULL,*applicationname_element=NULL,*executable_element=NULL,*stdout_element=NULL,*stderr_element=NULL,*working_element=NULL;
> axiom_attribute_t *applicationname_attribute=NULL;
>
>
> /* Creating all the namespace elements */
>
> jsdl_ns=axiom_namespace_create(env,"http://schemas.ggf.org/jsdl/2005/11/jsdl","jsdl");
> bes_factory_ns=axiom_namespace_create(env,"http://schemas.ggf.org/bes/2006/08/bes-factory","bes-factory");
> hpcp_ns=axiom_namespace_create(env,"http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcp","jsdl-hpcp");
> xml_ns=axiom_namespace_create(env,"http://www.w3.org/2001/XMLSchema-instance","xsi");
>
> /* CreateActivity Element */
>
> createactivity_element=axiom_element_create(env,NULL,"CreateActivity",bes_factory_ns,&createactivity_node);
>
> /* ActivityDocument element */
>
> activity_element=axiom_element_create(env,NULL,"ActivityDocument",bes_factory_ns,&activity_node);
>
> jobdefinition_element=axiom_element_create(env,NULL,"JobDefinition",jsdl_ns,&jobdefinition_node);
> jobdescription_element=axiom_element_create(env,NULL,"JobDescription",jsdl_ns,&jobdescription_node);
>
> /* Job Identification element */
>
> jobidentification_element=axiom_element_create(env,NULL,"JobIdentifiction",jsdl_ns,&jobidentification_node);
> jobname_element=axiom_element_create(env,NULL,"JObName",jsdl_ns,&jobname_node);
> //jobname_element to jobname_node
> om_text=axiom_text_create(env,jobname_node,"PBSToCCS",&text_node);
> axiom_node_add_child(jobidentification_node,env,jobname_node);
> axiom_node_add_child(jobdescription_node,env,jobidentification_node);
>
>
> application_element=axiom_element_create(env,NULL,"Application",jsdl_ns,&application_node);
> applicationname_element=axiom_element_create(env,NULL,"HPCProfileApplication",hpcp_ns,&applicationname_node);
> applicationname_attribute=axiom_attribute_create(env,"name","Example",NULL);
> axiom_element_add_attribute(applicationname_element,env,applicationname_attribute,applicationname_node);
>
> /* Executable Element */
>
> executable_element=axiom_element_create(env,NULL,"Executable",hpcp_ns,&executable_node);
> om_text=axiom_text_create(env,executable_node,"dir",&text_node);
> axiom_node_add_child(applicationname_node,env,executable_node);
>
> /* Stdout element */
>
> stdout_element=axiom_element_create(env,NULL,"Output",hpcp_ns,&stdout_node);
> om_text=axiom_text_create(env,stdout_node,"example.out",&text_node);
> axiom_node_add_child(applicationname_node,env,stdout_node);
>
> /* Stderr element */
>
> stderr_element= axiom_element_create(env,NULL,"Error",hpcp_ns,&stderr_node);
> om_text=axiom_text_create(env,stderr_node,"example.err",&text_node);
> axiom_node_add_child(applicationname_node,env,stderr_node);
>
> /* Working Directory Element */
>
> working_element=axiom_element_create(env,NULL,"WorkingDirectory",hpcp_ns,&working_node);
> om_text=axiom_text_create(env,working_node,"c:\\",&text_node);
> axiom_node_add_child(applicationname_node,env,working_node);
>
>
>
> axiom_node_add_child(application_node,env,applicationname_node);
>
> axiom_node_add_child(jobdescription_node,env,application_node);
>
>
> axiom_node_add_child(jobdefinition_node,env,jobdescription_node);
>
> axiom_node_add_child(activity_node,env,jobdefinition_node);
>
>
> axiom_node_add_child(createactivity_node,env,activity_node);
>
> axis2_char_t *om_str=NULL;
> om_str = axiom_node_to_string(createactivity_node,env);
> if(om_str)
> {
> printf("\n Body Element : %s\n", om_str);
> AXIS2_FREE(env->allocator, om_str);
> }
> return createactivity_node;
>
>}
>
>
>int getFactoryAttributesDocument()
>{
> axis2_char_t *file_name = NULL;
> axis2_char_t *file_name2 = NULL;
> axis2_status_t status = AXIS2_FAILURE;
> neethi_policy_t *policy = NULL;
> const axutil_env_t *env=NULL;
> const axis2_char_t *address=NULL;
> axis2_endpoint_ref_t* endpoint_reference=NULL;
> axis2_options_t *options=NULL;
> const axis2_char_t *client_home=NULL;
> axis2_svc_client_t *svc_client = NULL;
>
> /* Setup the environment */
>
> env = axutil_env_create_all("get.log",AXIS2_LOG_LEVEL_TRACE);
>
> /* Set end point reference of HPCP webservice */
>
> address = "https://altair-winccss0.pbsgridworks/HPCBasicProfile/HPCBasicProfile.svc";
> printf("Using Endpoint : %s \n", address);
>
> /* Create EPR with given address */
>
> endpoint_reference = axis2_endpoint_ref_create(env,address);
>
> /* Setup options */
>
> options = axis2_options_create(env);
> axis2_options_set_to(options,env,endpoint_reference);
> axis2_options_set_action(options,env,"http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetFactoryAttributesDocument");
>
> axutil_property_t *server_certificate=axutil_property_create(env);
> axutil_property_set_value(server_certificate,env,axutil_strdup(env,"/home/murali/murali.pem"));
> axis2_options_set_property(options,env,"SERVER_CERT",server_certificate);
>
> /* Reading the Client Home from environment */
> client_home = "/usr/local/axis2c";
> if (!client_home || !strcmp (client_home, ""))
> client_home=AXIS2_GETENV("AXIS2C_HOME");
>
> /* Creating Service Client */
>
> svc_client = axis2_svc_client_create(env, client_home);
> if (!svc_client)
> {
> printf("Error creating service client, Please check AXIS2C_HOME again\n");
> AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
> " %d :: %s", env->error->error_number,
> AXIS2_ERROR_GET_MESSAGE(env->error));
> return -1;
> }
>
> axis2_svc_client_set_options(svc_client,env,options);
> if(client_home)
> {
> file_name = axutil_stracat(env, client_home, AXIS2_PATH_SEP_STR);
> printf("%s",file_name);
> file_name2 = axutil_stracat(env, file_name, "./examples/policy.xml" );
> printf("%s",file_name2);
> AXIS2_FREE(env->allocator, file_name);
> file_name = NULL;
> }else{
> printf("Client Home not Specified\n");
> printf("echo client invoke FAILED!\n");
> return 0;
> }
> /*Create the policy, from file*/
> policy =neethi_util_create_policy_from_file(env,file_name2);
> if(file_name2){
> AXIS2_FREE(env->allocator, file_name2);
> file_name2 = NULL;
> }
> if(!policy)
> {
> printf("\nPolicy creation failed from the file. %s\n", file_name2);
> /*printf("echo client invoke FAILED!\n");
> return 0;*/
> }
>
> status = axis2_svc_client_set_policy(svc_client, env, policy);
>
> if(status == AXIS2_FAILURE)
> {
> printf("Policy setting failed\n");
> }
> else
> printf("policy setting done");
>
>
>
>
> axiom_namespace_t *bes_factory_ns=NULL;
> axiom_element_t *bes_factory_element=NULL;
> axiom_node_t *bes_factory_node=NULL,*text_node=NULL;
> axiom_text_t *om_text=NULL;
>
> bes_factory_ns=axiom_namespace_create(env,"http://schemas.ggf.org/bes/2006/08/bes-factory","bes-factory");
> bes_factory_element=axiom_element_create(env,NULL,"GetFactoryAttributesDocument",bes_factory_ns,&bes_factory_node);
>
> axis2_char_t *om_str=NULL;
> om_str = axiom_node_to_string(bes_factory_node,env);
> if(om_str)
> {
> printf("\n Body request : %s\n", om_str);
> AXIS2_FREE(env->allocator, om_str);
> }
>
> axiom_node_t *ret=axis2_svc_client_send_receive(svc_client,env,bes_factory_node);
> if(ret)
> {
> axis2_char_t *om_str=NULL;
> om_str = axiom_node_to_string(ret,env);
> if(om_str)
> {
> printf("\nReceived OM : %s\n", om_str);
> printf("\necho client invoke SUCCESSFUL!\n");
>
> AXIS2_FREE(env->allocator, om_str);
> } ret = NULL;
>
> }
> else
> {
> AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
> " %d :: %s", env->error->error_number,
> AXIS2_ERROR_GET_MESSAGE(env->error));
> printf("echo client invoke FAILED!\n");
>
>
> }
>
> if (svc_client)
> {
> axis2_svc_client_free(svc_client, env);
> svc_client = NULL;
> }
>
> if (env)
> {
> axutil_env_free((axutil_env_t *) env);
> env = NULL;
> }
>
> return 0;
>
>}
>
>
>
>
>int main()
>{
> getFactoryAttributesDocument();
>}
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org