cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the server IP address

Former Member
0 Kudos

Hi Experts,

In my scenario, if some problem occur, then the XSLT mapping sends a mail to some one,subject is 'PRD', if we execute this from production or quality or development server.

But now i want to know this mail from which server, so i want to change the subject line as 'PRD' if it is only from production system otherwise 'OTH', how to achieve this ? No hard code allow at any where.

I have one thought, if we find the server ip address then we can recognize, but how to get the server IP address ? Is it possible ?

Thanks

Ramesh

Accepted Solutions (1)

Accepted Solutions (1)

former_member181985
Active Contributor
0 Kudos

Use the below java statement in mapping as per your requirement to get the XI server IP address.

java.net.InetAddress.getLocalHost().getHostAddress();

Thanks,

- Gujjeti.

Former Member
0 Kudos

Hi Praveen

Thanks for your reply, can we use that java statement in the XSLT mapping, is it work ?

former_member181985
Active Contributor
0 Kudos

You can call java methods in XSLT.

Thanks,

- Gujjeti.

Answers (3)

Answers (3)

former_member193376
Active Contributor
0 Kudos

Hi

http://www.webdeveloper.com/forum/showthread.php?t=163567

http://biglist.com/lists/xsl-list/archives/200602/msg00571.html

This should help you.

Thanks

SG

Edited by: Saiyog Gonsalves on Feb 17, 2009 12:55 PM

Former Member
0 Kudos

Hi,

It will be helpful for you and every one if you could provide few more details like OS platform etc. For example in windows environment go to command prompt and execute ipconfig to get the IP address.

Hope this helps.

Manoj

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi Experts,

>

> In my scenario, if some problem occur, then the XSLT mapping sends a mail to some one,subject is 'PRD', if we execute this from production or quality or development server.

>

> But now i want to know this mail from which server, so i want to change the subject line as 'PRD' if it is only from production system otherwise 'OTH', how to achieve this ? No hard code allow at any where.

>

> I have one thought, if we find the server ip address then we can recognize, but how to get the server IP address ? Is it possible ?

>

>

> Thanks

> Ramesh

You want to know the IP of the source system???

What is the flow of your interface? My understanding is your target is Mail. What is the source?

Former Member
0 Kudos

Hi,

My source is some WSDL file, this is more than 15000 characters so i am unable to send the full file.

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

<wsdl:types>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" />

<xsd:element name="Pip3A4PurchaseOrderRequest" type="Pip3A4PurchaseOrderRequest" />

<xsd:complexType name="Pip3A4PurchaseOrderRequest">

<xsd:sequence>

<xsd:element name="fromRole" type="fromRole" />

<xsd:element name="GlobalDocumentFunctionCode" type="xsd:string" />

<xsd:element name="PurchaseOrder" type="PurchaseOrder" />

<xsd:element name="thisDocumentGenerationDateTime" type="thisDocumentGenerationDateTime" />

<xsd:element name="thisDocumentIdentifier" type="thisDocumentIdentifier" />

<xsd:element name="toRole" type="toRole" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="fromRole">

<xsd:sequence>

<xsd:element name="PartnerRoleDescription" type="PartnerRoleDescription" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="PartnerRoleDescription">

<xsd:sequence>

<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0" />

<xsd:element name="GlobalPartnerRoleClassificationCode" type="xsd:string" />

<xsd:element name="PartnerDescription" type="PartnerDescription" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="ContactInformation">

<xsd:sequence>

<xsd:element name="contactName" type="contactName" minOccurs="0" />

<xsd:element name="EmailAddress" type="xsd:string" minOccurs="0" />

<xsd:element name="facsimileNumber" type="facsimileNumber" minOccurs="0" />

<xsd:element name="telephoneNumber" type="telephoneNumber" minOccurs="0" />

<xsd:element name="PhysicalAddress" type="PhysicalAddress" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="contactName">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="FreeFormText">

<xsd:simpleContent>

<xsd:extension base="xsd:string">

<xsd:attribute ref="xml:lang" />

</xsd:extension>

</xsd:simpleContent>

</xsd:complexType>

<xsd:complexType name="facsimileNumber">

<xsd:sequence>

<xsd:element name="CommunicationsNumber" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="telephoneNumber">

<xsd:sequence>

<xsd:element name="CommunicationsNumber" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="PartnerDescription">

<xsd:sequence>

<xsd:element name="BusinessDescription" type="BusinessDescription" />

<xsd:element name="GlobalPartnerClassificationCode" type="xsd:string" minOccurs="0" />

<xsd:element name="PhysicalAddress" type="PhysicalAddress" minOccurs="0" />

<xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="BusinessDescription">

<xsd:sequence>

<xsd:element name="GlobalBusinessIdentifier" type="xsd:string" minOccurs="0" />

<xsd:element name="GlobalSupplyChainCode" type="xsd:string" minOccurs="0" />

<xsd:element name="businessName" type="businessName" minOccurs="0" />

<xsd:element name="NationalBusinessTaxIdentifier" type="NationalBusinessTaxIdentifier" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="PurchaseOrder">

<xsd:sequence>

<xsd:element name="AccountDescription" type="AccountDescription" minOccurs="0" />

<xsd:element name="comments" type="comments" minOccurs="0" />

<xsd:element name="ContractInformation" type="ContractInformation" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="DocumentReference" type="DocumentReference" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="FinancingTerms" type="FinancingTerms" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="generalServicesAdministrationNumber" type="generalServicesAdministrationNumber" minOccurs="0" />

<xsd:element name="GlobalGovernmentPriorityRatingCode" type="xsd:string" minOccurs="0" />

<xsd:element name="GlobalPurchaseOrderFillPriorityCode" type="xsd:string" minOccurs="0" />

<xsd:element name="GlobalPurchaseOrderTypeCode" type="xsd:string" maxOccurs="unbounded" />

<xsd:element name="governmentContractIdentifier" type="governmentContractIdentifier" minOccurs="0" />

<xsd:element name="installAt" type="installAt" minOccurs="0" />

<xsd:element name="isDropShip" type="isDropShip" />

<xsd:element name="OrderShippingInformation" type="OrderShippingInformation" minOccurs="0" />

<xsd:element name="ProductLineItem" type="ProductLineItem" maxOccurs="unbounded" />

<xsd:element name="proprietaryInformation" type="proprietaryInformation" minOccurs="0" />

<xsd:element name="requestedEvent" type="requestedEvent" minOccurs="0" />

<xsd:element name="requestedShipFrom" type="requestedShipFrom" minOccurs="0" maxOccurs="unbounded" />

<xsd:element name="SecondaryBuyer" type="SecondaryBuyer" minOccurs="0" />

<xsd:element name="shipTo" type="shipTo" minOccurs="0" />

<xsd:element name="TaxExemptStatus" type="TaxExemptStatus" minOccurs="0" />

<xsd:element name="totalAmount" type="totalAmount" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="AccountDescription">

<xsd:sequence>

<xsd:element name="accountName" type="accountName" />

<xsd:element name="AccountNumber" type="xsd:string" minOccurs="0" />

<xsd:element name="billTo" type="billTo" minOccurs="0" />

<xsd:element name="CreditCard" type="CreditCard" minOccurs="0" />

<xsd:element name="financedBy" type="financedBy" minOccurs="0" />

<xsd:element name="GlobalAccountClassificationCode" type="xsd:string" minOccurs="0" />

<xsd:element name="prePaymentCheckNumber" type="prePaymentCheckNumber" minOccurs="0" />

<xsd:element name="WireTransferIdentifier" type="xsd:string" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="accountName">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="billTo">

<xsd:sequence>

<xsd:element name="PartnerRoleDescription" type="PartnerRoleDescription" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="PhysicalAddress">

<xsd:sequence>

<xsd:element name="addressLine1" type="addressLine1" minOccurs="0" />

<xsd:element name="addressLine2" type="addressLine2" minOccurs="0" />

<xsd:element name="addressLine3" type="addressLine3" minOccurs="0" />

<xsd:element name="cityName" type="cityName" minOccurs="0" />

<xsd:element name="GlobalCountryCode" type="xsd:string" minOccurs="0" />

<xsd:element name="GlobalLocationIdentifier" type="xsd:string" minOccurs="0" />

<xsd:element name="NationalPostalCode" type="xsd:string" minOccurs="0" />

<xsd:element name="postOfficeBoxIdentifier" type="postOfficeBoxIdentifier" minOccurs="0" />

<xsd:element name="regionName" type="regionName" minOccurs="0" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="addressLine1">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="addressLine2">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="addressLine3">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="cityName">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="postOfficeBoxIdentifier">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="regionName">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="businessName">

<xsd:sequence>

<xsd:element name="FreeFormText" type="FreeFormText" />

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="CreditCard">

<xsd:sequence>

<xsd:element name="cardHolderName" type="cardHolderName" />

<xsd:element name="creditCardIdentifier" type="creditCardIdentifier" />

<xsd:element name="expiryDate" type="expiryDate" />

<xsd:element name="GlobalCreditCardClassificationCode" type="xsd:string">