Problem while sending HL7 ACK to HL7 external system
Hello,
I am facing a problem with GlassFish ESB.
The product version indicated in the IDE is: NetBeans IDE 6.1 (Build 200810140114). I have not yet tested the current version.
My problem is as follow:
- I have 2 service assemblies, one is File BC > HL7 BC and the other HL7 BC > BPEL with Database WSDL as partners.
- It seems everything is doing OK. The HL7 file is read by File BC, then sent to HL7 BC, retrieved by the second HL7 BC, fed to the BPEL, and finally queries are executed. Then an ACK message is generated and an error occurs. Here is the stacktrace:
HL7BC-I0155: Sent HL7 request to HL7 External System :MSH
EVN|A01|2008090801529|||JavaCAPS6^^^^^^^USERS
PID|1||A000010^^^HosA^MR^HosA||Noseda^Arthur^^^^^||19460101123045|M|||7 South 3rd Circle^^Downham Market^England - Norfolk^30828^UK^||||||||A2008090801529
PV1|1|I|^^^|I|||FUL^Fulde^Gordian^^^^^^^^^^MAIN|||EMR|||||||||V2008090801529^^^^VISIT|||||||||||||||||||||||||2008090801529
HL7BC-I0117: Received a message in HL7 binding 68899546013632-10229-134707429449130110
HL7BC-I0137: Pattern for message exchange ID 68899546013632-10229-134707429449130110 is http://www.w3.org/2004/08/wsdl/in-only
HL7BC-I0135: Constructing the ACK message with version ID HL7v231
HL7BC-I0162: Creating ACK Builder object of class com.sun.jbi.hl7bc.extservice.ack.HL7v231ACKBuilder
HL7BC-I0136: Constructed ACK message to be send to the sender MSH
MSA|AA|CTLID_2008090801529
HL7BC-I0129: Sending ACK back to the sender
HL7BC-I0141: MLLPEncoder.setStartBlockChar():Value is set as : (in decimal ascii).
HL7BC-I0143: MLLPEncoder.setEndDataChar():Value is set as : (in decimal ascii).
HL7BC-I0142: MLLPEncoder.setEndBlockChar():Value is set as :
(in decimal ascii).
HL7BC-I0144: MLLPDecoder.setStartBlockChar(): Value is set as : (in decimal ascii).
HL7BC-I0146: MLLPDecoder.setEndDataChar(): Value is set as : (in decimal ascii).
HL7BC-I0145: MLLPDecoder.setEndBlockChar(): Value is set as :
(in decimal ascii).
HL7BC-I0160: Sending HL7 message acknowledgement to HL7 External System :MSH
MSA|AA|CTLID_2008090801529
ERREUR : 'HL7ENC-E0027: Element: MSH.11 must occur at least 1 time(s)'
HL7BC-W0126: Unable to decode the message due to error=[javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: HL7ENC-E0027: Element: MSH.11 must occur at least 1 time(s)]
ERREUR : 'HL7ENC-E0027: Element: MSH.11 must occur at least 1 time(s)'
HL7BC-E0209: Failed to process the message exchange with ID 68899546013632-10229-134707429439760109 and exchange pattern http://www.w3.org/2004/08/wsdl/in-only due to error: HL7BC-W0121: Unable to process message exchange 68899546013632-10229-134707429439760109, end point com.sun.jbi.hl7bc.EndpointImpl@8cce44 and operation {http://j2ee.netbeans.org/wsdl/HL7v22_Feeder_CA/HL7v22_Feeder_CA_HL7_ANY_HL7Out}hl7wsdlOperation.
java.lang.Exception: HL7BC-W0121: Unable to process message exchange 68899546013632-10229-134707429439760109, end point com.sun.jbi.hl7bc.EndpointImpl@8cce44 and operation {http://j2ee.netbeans.org/wsdl/HL7v22_Feeder_CA/HL7v22_Feeder_CA_HL7_ANY_HL7Out}hl7wsdlOperation.
at com.sun.jbi.hl7bc.OutboundMessageProcessor.processOneWayOutbound(OutboundMessageProcessor.java:851)
at com.sun.jbi.hl7bc.OutboundMessageProcessor.processMessage(OutboundMessageProcessor.java:301)
at com.sun.jbi.hl7bc.OutboundAction.run(OutboundAction.java:66)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: HL7ENC-E0027: Element: MSH.11 must occur at least 1 time(s)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:720)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at com.sun.jbi.hl7bc.util.XmlUtil.transformToDOMResult(XmlUtil.java:268)
at com.sun.jbi.hl7bc.OutboundMessageProcessor.getDOMResult(OutboundMessageProcessor.java:2187)
at com.sun.jbi.hl7bc.OutboundMessageProcessor.start2WayChannelWithExtSystem(OutboundMessageProcessor.java:1723)
at com.sun.jbi.hl7bc.OutboundMessageProcessor.processOneWayOutbound(OutboundMessageProcessor.java:825)
... 5 more
Caused by: org.xml.sax.SAXParseException: HL7ENC-E0027: Element: MSH.11 must occur at least 1 time(s)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.throwException(UnmarshalAdaptor.java:1181)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parsePseudoGroup(UnmarshalAdaptor.java:771)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parseFieldCompSubcomp(UnmarshalAdaptor.java:490)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parseParticle(UnmarshalAdaptor.java:340)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parseSequence(UnmarshalAdaptor.java:571)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parseParticle(UnmarshalAdaptor.java:351)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parseSegmentOrPseudo(UnmarshalAdaptor.java:532)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parseParticle(UnmarshalAdaptor.java:342)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parseSequence(UnmarshalAdaptor.java:571)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parseParticle(UnmarshalAdaptor.java:351)
at com.sun.encoder.hl7.runtime.provider.UnmarshalAdaptor.parse(UnmarshalAdaptor.java:306)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:637)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
... 10 more
Accepted the message in DBBC Binding.
HL7BC-I0139: Set message exchange status to ERROR for message exchange ID 68899546013632-10229-134707429439760109 and exchange pattern http://www.w3.org/2004/08/wsdl/in-only
FILEBC-W00708: One-Way Inbound MessageExchange for service: {HL7v22_Feeder_CA}casaService1, endpoint: casaPort1, operation: {http://j2ee.netbeans.org/wsdl/HL7v22_Feeder_CA/HL7v22_Feeder_CA_HL7_ANY_HL7Out}hl7wsdlOperation, was returned with status=ERROR. If Re-delivery is configured, message will be re-sent.
FILEBC-E00767: Provider for service [{HL7v22_Feeder_CA}casaService1] endpoint [casaPort1] responded with an error status. Error detail is: HL7BC-W0121: Unable to process message exchange 68899546013632-10229-134707429439760109, end point com.sun.jbi.hl7bc.EndpointImpl@8cce44 and operation {http://j2ee.netbeans.org/wsdl/HL7v22_Feeder_CA/HL7v22_Feeder_CA_HL7_ANY_HL7Out}hl7wsdlOperation.I wonder if the MEP could be the reason. I think I chose in-only, and for the ACK to be sent, it could be necessary to go for in-out. Yet, what's puzzling me is the error message: MSH.11 must occur at least 1 time(s). Could it be that the ACK is badly generated? In the input (ADT) HL7 this field is populated with a P.
Sadly, the reason was nothing but the Oracle JDBC driver. While it was correctly working as far as NetBeans is concerned, it was not for GlassFish. Hence, with the bubbling up exception mechanism, the stacktrace I got. Problem solved, but nasty error message.
Thanks anyway.
Similar Messages
-
Problem while sending the mail from sap
Hi experts,
I am facing some problem while sending mail from sap to external mail.
this is th code i am using but it is not working. plz check and tell me.
REPORT ZMAIL_DEMO.
data: maildata type sodocchgi1.
data: mailtxt type table of solisti1 with header line.
data: mailrec type table of somlrec90 with header line.
start-of-selection.
break-point.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test'.
maildata-obj_langu = sy-langu.
mailtxt-line = 'This is a test'.
append mailtxt.
mailrec-receiver = 'SOME MAIL ID'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc = 0. "( did not receive any mail) *
write : 'mail sent'.
endif.Hi,
Please check with the following code.
TABLES: KNA1.
data for send function
DATA DOC_DATA LIKE SODOCCHGI1.
DATA OBJECT_ID LIKE SOODK.
DATA OBJCONT LIKE SOLI OCCURS 10 WITH HEADER LINE.
DATA RECEIVER LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.
SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.
WRITE:/ KNA1-KUNNR, KNA1-ANRED.
send data internal table
CONCATENATE KNA1-KUNNR KNA1-ANRED
INTO OBJCONT-LINE SEPARATED BY SPACE.
APPEND OBJCONT.
ENDSELECT.
insert receiver (sap name)
REFRESH RECEIVER.
CLEAR RECEIVER.
MOVE: 'any_email'_ TO RECEIVER-RECEIVER, " SY-UNAME
'X' TO RECEIVER-EXPRESS,
'U' TO RECEIVER-REC_TYPE.
APPEND RECEIVER.
insert mail description
WRITE 'Sending a mail through abap'
TO DOC_DATA-OBJ_DESCR.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_DATA
IMPORTING
NEW_OBJECT_ID = OBJECT_ID
TABLES
OBJECT_CONTENT = OBJCONT
RECEIVERS = RECEIVER
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8. -
Problem while sending the message using RWB
Dear All,
I am facing a problem while sending a message from RWB. I sent the message using Test Message in component monitoring, it says message sent but I am not able to see any message in sxi_monitor.
When I send the same message using the http client it successfully processed by XI and I can see the success message in sxi_monitor.
Please let me know if anyone has face similar kind of issue.
Thanks,
Alok
Edited by: Alok Raoka on May 26, 2008 5:08 PMDear All,
I am facing a problem while sending a message from RWB. I sent the message using Test Message in component monitoring, it says message sent but I am not able to see any message in sxi_monitor.
When I send the same message using the http client it successfully processed by XI and I can see the success message in sxi_monitor.
Please let me know if anyone has face similar kind of issue.
Thanks,
Alok
Edited by: Alok Raoka on May 26, 2008 5:08 PM -
Problem while sending FAX through PRINT_TEXT FM
Hi All,
I have a problem while sending a fax.
we are sending fax through the FM PRINT_TEXT.
Below is the FM we are passing paramenters.
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
APPLICATION = 'TX'
DEVICE = 'TELEFAX'
DIALOG = SPACE
HEADER = fs_header
OPTIONS = fs_popt
IMPORTING
RESULT = fs_pres
TABLES
LINES = <b>int_fax</b>
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
UNKNOWN = 6
FORMAT = 7
TEXTFORMAT = 8
COMMUNICATION = 9
BAD_PAGEFORMAT_FOR_PRINT = 10
OTHERS = 11.
if sy-subrc ne 0.
p_flag = lit_x.
endif.
In INT_FAX internal table we have two fields one is tdformat second one is tdline
The lengh of the TDLINE is 132 char,Initially for all reocords we have only 108 char length,But according to user requirement we added one more field in taht
Now the lengh increased to 132 for each records.
When i checked in debugg mode the INT_FAX internal table have all 132 characters.
The problem is while checking in SOST trnasaction it is showing 108 characters in one line and remaining in second line,can you please help on this.
Thanks In advance
Sriman.may it be that in those cases where it doesnt work, that you got no fax number?
Since it works soemtimes, it seems there are no errors, but rather in some cases some important info is missing, fax number may be one of thsoe important info in a FAX scenario. -
Problem while sending IDOC to File Senario
Hi Experts
I am having problem while sending the Idoc from SAP R/3 to File
I have done all the setting in SAP as well in XI but while pushing IDOC
I am getting error in the transaction sm58 in SAP R/3
" <b>The service for the client 300(My SAP R/3 client) is not present in Integration
Directory</b>"
I can any one explain me what to done on this....all the connections are fine
Waiting for Response
Adv points and thanx
RakeshReason and Prerequisites
You send IDocs from system ABC to the exchange infrastructure (XI) of system XIZ, and error messages are issued in system ABC (Transaction SM58) for the IDOC_INBOUND_ASYNCHRONOUS function module.
This note proposes solutions for the following error messages:
a) No service for system SAPABC client 123 in the integration directory
b) Transaction IDX1: Port SAPABC, client 123, RFC destination
c) ::000
d) NO_EXEC_PERMISSION: "USER" "Business_System"
e) IDoc adapter inbound: Error error ...
Solution
a) Error message: No service for system SAPABC client 123 in the integration directory
Solution:
You send IDocs from system ABC to XI. In the control record of the IDoc, the SNDPOR field contains the value "SAPABC". The client of the sending system is determined by the MANDT field of the control record. The system ID and client are then used to determine a service without party of the type (business-system/business-service):
Business system
Activities in the System Landscape Directory (SLD)(Create technical system):
Create a technical system for system ABC in the SLD, and create the client for this. Do not forget to assign an "ALE logical system" (for example, "ABCCLNT123") to this technical system.
SLD (Business system):
You can now explicitly assign a business system to this client.
For more details, refer to the SLD documentation.
Activities in system ABC (self-registration in the SLD):
Alternatively, you can register the system in the SLD in system ABC with Transaction RZ70. You will find detailed information about the SLD registration of systems on the SAP Service Marketplace for the "Exchange Infrastructure" in the document "Exchange_Installation_Guide.pdf".
In system ABC, you can check your configuration with TransactionSLDCHECK.
Activities in Integration Directory (import business system from SLD):
You will find the business systems under Services Without Party in the Integration Services. In the Service menu, you will find the system identifiers, the client, and the corresponding ALE logical system under "Objects"->"Adapter-specific identifiers".
Use the Import/Update button to copy the data from the SLD, to create business systems, or to update their identifiers.
Business service
Activities in the Integration Builder directory:
You want to create a service without party that is not part of your system infrastructure and is therefore not maintained in the SLD.
In the Integration Builder directory, you will find the "Business-Services" under Services Without Party. In the Service menu, you will find the system identifiers, the client, and the corresponding ALE logical system under "Objects"->"Adapter-specific identifiers".
Activate the change list in Integration Directory.
In system ABC, you can restart the incorrect entry from Transaction SM58 .
b) Error message: Transaction IDX1: Port SAPABC, client 123, RFC destination
Solution:
The Integration Server tries to load the IDoc metadata from the sending system. The IDoc schemas from the Integration Repository cannot be used because they are release-dependent.
The sending system is determined by the value of the "SNDPOR" field from the IDoc control record (for example, "SAPABC").
Activities in the central XI system:
In Transaction IDX1, you can assign an RFC destination to the sending system (for example, "SAPABC"). This must be created beforehand in Transaction SM59.
Note that the IDoc metadata is cross-client data. In Transaction IDX1, only one entry must be maintained for each system. Only the lowest client is used by the runtime for Idoc metadata retrieval with RFC.
Ensure that only SAPABC and not "SAPABC_123" is entered in the port name.
c) Error message: "::000"
Solution:
This error occurs if the central XI system tries to load the IDoc metadata from the sending system by RFC.
There may be several different reasons for the failure of the metadata import, the error is not transferred in full by tRFC completely, and this results in the error message above.
User cannot log onto sending system
User/password/client is not correct or the user is logged due to too many failed logons.
Activities in sender system ABC:
Transaction SM21 contains entries for failed logons.
Activities in the central XI system:
Determine the sending port from the IDoc control record of the IDoc. If the ID of the sending system has the value "ABC", the value of the sending port is "SAPABC". You will find the RFC destination used for the "SAPABC" sending port with the lowest client in Transaction IDX1. In Transaction SM59, you will find the RFC destination containing the maintained logon data .
User does not have the required authorizations
Activities in the sender system ABC:
In Transaction SM21, you will find entries relating to authorization problems and more exact details.
Contact your system administrator and, if necessary, assign the user the required roles in user administration.
IDoctyp/Cimtyp cannot be loaded
Activities in sender system ABC:
In the sender system, you can check your IDoc types in Transaction WE30 (IDoc type editor) Take note not only of the errors, but also of the warnings.
The most common errors are:
- IDoc type or segments not released
- Segments that no longer exist are listed in the IDoc type
- Data elements that do not exist in the DDIC are assigned to fields
in the segment.
Contact your system administrator and correct these errors in the IDoc type.
d) Error message: NO_EXEC_PERMISSION: "User" "Business_System"
Solution:
You created a list of users in the directory who are authorized to use the "Business_System". The user in the error message is not on the list.
Alternatively, the same error is used if you have created a sender agreement with a channel of the IDoc type for the "Business_System" and the interface used. The user in the error message is not contained in the list of all authorized users defined there.
e) Error message: IDoc adapter inbound: Error error
Solution:
You send IDocs to the central XI system, where they are received by the IDoc adapter. The IDocs are converted into IDoc XML, and a corresponding XI message is generated and transferred to the XI Runtime Engine. The Engine tries to read its own business system from the "Exchange Profile". If the Exchange Profile is currently unavailable, the message is not processed and it is returned to the sending system with an error message.
Regard's
Prabhakar..... -
Problem while sending unicode (utf-8) xml to IE.
Hi,
I have encoding problem while sending utf-8 xml from servlet to IE (Client), where i am parsing the xml using Ajax.
In the log I can see proper special characters that are being sent from the servlet. but when same is seen in the client end,, it is showing ? symbols instead of special charcters.
This is the code that sends the xml from servlet.
ByteArrayOutputStream stream = new ByteArrayOutputStream(2000);
transformer.transform(new DOMSource(document), new StreamResult(new OutputStreamWriter(stream, "iso-8859-1")));
_response.setContentType("text/xml; charset=UTF-8");
_response.setHeader("Cache-Control", "no-cache");
_response.getWriter().println(new String(stream.toByteArray(), "UTF-8"));
In the log i can see :
<response status="success" value="1154081722531" hasNextPage="false" hasPreviousPage="false" ><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd �" mode="edit" column_en_US="asdasd �" column_de_DE="? xyz" column_fr_FR="" ></row></response>
But in the Client side I am able to see
<?xml version = '1.0' encoding = 'UTF-8'?>
<response status="success" value="1154082795061" hasNextPage="false" hasPreviousPage="false"><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd ?" mode="edit" column_en_US="asdasd ?" column_de_DE="? xyz" column_fr_FR=""/></response>
I am getting ? instead of �.
It will be greatful if somebody tell how to send utf xml from servlet, for ajax purpose.
Thanks,
Siva1This is the code that sends the xml from servlet.
ByteArrayOutputStream stream = new
ByteArrayOutputStream(2000);
transformer.transform(new DOMSource(document), new
StreamResult(new OutputStreamWriter(stream,
"iso-8859-1")));Here you produce XML that's encoded in ISO-8859-1. (!!!)
_response.setContentType("text/xml; charset=UTF-8");Here you tell the browser that it's encoded in UTF-8.
_response.getWriter().println(new String(stream.toByteArray(), "UTF-8"));Here you convert the XML to a String, assuming that it was encoded in UTF-8, which it wasn't.
Besides shooting yourself in the foot by choosing ISO-8859-1 for no good reason, you're also doing a lot of translating from bytes to chars and back again. Not only is that a waste of time, it introduces errors if you don't do it right. Try this instead:_response.setContentType("text/xml; charset=UTF-8");
_response.setHeader("Cache-Control", "no-cache");
_transformer.transform(new DOMSource(document_),
new StreamResult(_response.getOutputStream())); -
How to rollback a traansacation if we got any problem while sending data to
how to rollback a traansacation if we got any problem while sending data to a webservice...
Is it SOA or OSB? Which version you are in..
-
Problem with Send and Receive Emal In SAP System
Hi gurus!
I have a following quote:
Dear !
I have a problem with send and receive email in SAP system following :
I want to test send and receive email in local network at my company. I
had two server
Server 1 : I setup Exchange Mail Server 2007 with domain controller is
fes.com
Server 2 : I setup SAP ERP ECC 6.0
On Server 1 : I created 2 account ( u1Afes.com and u2Afes.com ) and then I tested send and receive email between u1 and u2 in local network through Microsoft Outlook 2007 -> OK
and then
On Server 2: I had configured send and receive email on SAP system
through tcode SBWP, SCOT and SOST as Note 455140 - "Configuration of
e-mail, fax, paging or SMS using SMTP"
for example :
I logged in SAP system with user Basis01 (with email u1Afes.com ) -> then,using tcode SBWP -> new message -> send to u2Afes.com with Internet Mail type and then status message with green light -> sending ok
and then I have used Microsoft Outlook 2007, I logged with account u2 ->check email -> Ok. I saw message which send from u1
Finally, My problem is how can receive mail in SAP system without using Microsoft Outlook
For example:
Login system SAP with Basis01 account (with u1Afes.com ) -> tcode SBWP ->New Message -> send to u2Afes.com
and then
Login system SAP with Basis02 account (with u2Afes.com ) -> tcode ??? ->
To receive email from Basis01 (with u1Afes.com )
Please help me now
Thanks
I replace "@" with "A" because of banning email of this forum.
This quote is about sending email in local network. And we can't receive any email from the outside email address. Addition if I wanna send email to internal email in Internet (we've just tried with email address in local network) What should I config in SAP and Exchange ?
By the way, Is SAP Server IP added to Relay Agent for sending or receiving mail ?
Regards
An NLP
Edited by: An NLP on Apr 6, 2010 7:03 PMHi,
This problem is a classic problem of mail routing via Exchange. Exchange like most mail servers use the domain part of the email address as a means to route mails. So I will make an assumption that your main company mail addrss is "User @ fes.com".
So when you send a mail to the "User @ fes.com mail" address the mail is delivered to your Outlook mail address as this is the default route for company.
(Q) So how do you get your Exchange server to relay the mail into the sending SAP system?
(A) The easiest way would be to setup and unique mail domain for your SAP system. I always recommend "user @ client.sid.company.com" which in your case would be "u1 @ 100.PRD.fes.com". You can then instruct Exchange to send any emails addressed to 100.PRD.fes.com domain to your SAP system. Also using this format of address you can configure multiple mail connections into multiple SAP systems.
(A) Another answer would be to enter the "Full" email address (LOcal and Domain part of address) into the routing rule for Exchange e.g. "U1 @ fes.com" so that all emails addressed to this user will be delivered into SAP. However this method requires a lot of Admin as you will have to update Exchange with ALL email address that need to receive emails. Also if your corporate mail address is "U1 @ fes.com" then all mails will be forwarded to SAP.
I would definitely NOT recommend this method but the decision is up to you.
P.S. The IP address of the SAP system is entered into the mail header of the email. This is standard practice in SMTP relay. You can suppress this header in Exchange
Hope this helps
Michael -
Send HU structure to an external system through an idoc
Hi,
I need to send the description of an HU (Sub HUs and materials to an external system).
Do you know if there is any standard idoc type allowing to do that.
I tried to use idoc HU_CREATE or HU_PROCESSOUTPUTDIRECT but I think none of them will allow me to do that because there is no function module in outbound mode that I can use with them/
Any ideas?
Thanks in advance.
RegardsHi,
In order to send data to external system and if you have an middleware used in your landscape then
create logical system for that system and associate the port with RFC destination (based on middleware used type 3 ot type t) can be used and idoc can be sent to middleware and middleware can take care of sending the data to the external system by converting it into required format..
These are normal scenarios for which Middlewares are used for integration..
HTH
Rajesh -
Send R/3 data to external system
Hi Guru's,
how to send R/3 data to external system (Oracle databse).
thanks in advance.
Ramu.Refer to this link
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0cc5049-5837-2b10-8ca5-f0e948762522
it is a very good document on IDOCs
or you may search for this in
sapbrain.com or
thespot4sap
or even within SDN you may search for IDOCs you will get lots of info
Regards,
Anil -
Problem while sending FAX (Error Message 802 if checked in SOST)
Hi all,
I'm using FM SO_NEW_DOCUMENT_SEND_API1 to send Email and Fax through ABAP prog.
The Email is going fine but there is a problem in sending Fax, when i chek in SOST i get the following message.
Msg No <b>802</b> No delivery to 0091802299922, as recipient unknown.
This is my Fax No. +91 91-80-2299922
My selection screen is as follows
Email ID : External Email id
Fax No: 802299922 ( Passing Fax No in this format )
Country IND
The following is the code of my program, please show up some light on any mistake made in the same.
*& This is my Source Code
report z_email.
tables : somlreci1.
data : e_document_data like sodocchgi1,
e_document_type like soodk-objtp value 'RAW',
e_put_in_outbox like sonv-flag value 'X',
e_commit_work like sonv-flag value 'X'.
data : it_object_header type table of solisti1 with header line,
it_object_content type table of solisti1 with header line,
receivers type table of somlreci1 with header line.
data : i_lines type i.
select-options : s_mailid for somlreci1-receiver no intervals.
parameters : p_faxno type somlreci1-fax,
p_contry type somlreci1-country.
start-of-selection.
e_document_data-obj_name = 'Test'.
e_document_data-obj_descr = 'Email Test'.
e_document_data-obj_langu = sy-langu.
e_document_data-proc_type = '1'.
*--Information
it_object_content-line = 'This is a report used to send starts and'.
append it_object_content.
clear it_object_content.
it_object_content-line = ' stops to foreign distri. via E-Mail or Fax'.
append it_object_content.
clear it_object_content.
*--For Doc Size
describe table it_object_content lines i_lines.
e_document_data-doc_size = ( i_lines - 1 ) * 255 +
strlen( it_object_content ).
*--Email ID
loop at s_mailid.
receivers-receiver = s_mailid-low.
receivers-rec_type = 'U'.
append receivers.
clear : receivers.
endloop.
*--Fax
if p_faxno is not initial.
receivers-rec_type = 'F'.
receivers-fax = p_faxno.
receivers-country = p_contry.
receivers-com_type = 'TELFAX'.
append receivers.
clear : receivers.
endif.
*--Call function module
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = e_document_data
document_type = e_document_type
put_in_outbox = e_put_in_outbox
commit_work = e_commit_work
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
tables
OBJECT_HEADER =
object_content = it_object_content
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = receivers
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8
if sy-subrc = 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
commit work.
wait up to 2 seconds.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
write :/ 'Message sent successfully..!'.
endif.
Regards,
Balavardhan.KHi ,
I am facing similar problem , in case you have a resolution about the FAX number , then please let me know .
Thanks,
Abhishek
([email protected]) -
Line Alignment Problem while sending Fax from SAP Script
Moderator message: please do not post the same question in different forums
Hi Experts,
While sending fax the horizontal lines are not displaying till the end of the page.
But in the print preview the lines are displying till the end.
If this is printed using local printer the lines are printing fine but the problem is with the fax.
Please provide me a solution for this.
Regards,
Rajesh.
Edited by: Matt on Nov 25, 2008 2:51 PMPuzzling.
I've seen where the printed output doesn't match the print preview but not a fax not matching a print.
Do you use SAPConnect or the older SAPComm method for faxing?
How do you produce the horizontal lines? BOX commands, ULINE, '-', etc.? -
Problem while sending Abap list to mail in the background
Hi all,
I am sending abap list to email in the background.
My code as folllows:
DATA: so_ali LIKE solisti1 OCCURS 100 WITH HEADER LINE.
DATA: listobject LIKE abaplist OCCURS 0 WITH HEADER LINE.
DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
DATA: doc_chng LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
DATA: lt_user TYPE soud3 OCCURS 0 WITH HEADER LINE.
*Start of modification Tix 14411 for transport request D82K929044
DATA: it_user like SODLIENTI1 occurs 0 with header line.
*End of modification for Tix 14411 for transport request D82K929044
CLEAR: listobject, so_ali, objpack, objhead, objtxt, reclist, doc_chng.
REFRESH :
listobject, so_ali, objpack, objhead, objtxt, reclist.
creation of the document to be sent
doc_chng-obj_name = 'BOFAREPORT'.
WRITE sy-datum TO doc_chng-obj_descr.
CONCATENATE 'Bank Activity Report for :'(025)
company_itab_tr-company_code '-' doc_chng-obj_descr INTO
doc_chng-obj_descr. "AN052799
objtxt = 'This is the bank activity report received for'(026).
APPEND objtxt.
CONCATENATE company_itab_tr-company_code '-'
company_itab_tr-company_name '-'
company_itab_tr-company_city INTO
objtxt.
APPEND objtxt.
WRITE sy-datum TO objtxt.
CONCATENATE 'Date Received : '(027) objtxt INTO objtxt.
APPEND objtxt.
WRITE sy-uzeit TO objtxt.
CONCATENATE 'Time Received : '(028) objtxt INTO objtxt.
APPEND objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
Creation of the entry for the compressed document
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
Creation of the document attachment
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = '0'
TABLES
listobject = listobject
EXCEPTIONS
list_index_invalid = 1
OTHERS = 2.
CALL FUNCTION 'TABLE_COMPRESS' "Schneller Tabellencopy
TABLES
in = listobject
out = so_ali.
DESCRIBE TABLE so_ali LINES tab_lines. "objbin
objhead = 'BOFA-REPORT'. APPEND objhead.
Creation of the entry for the compressed attachment
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'ALI'.
objpack-obj_name = 'BOFAREPORT'.
objpack-obj_descr = 'Bank Activity Report'.
objpack-doc_size = tab_lines * 255.
APPEND objpack.
Completing the recipient list
SELECT * FROM zwfi_yefap_paypr WHERE
bukrs = company_itab_tr-company_code.
IF NOT ( zwfi_yefap_paypr-list1 IS INITIAL ).
clear it_user[].
CALL FUNCTION 'SO_DLI_READ_API1'
EXPORTING
DLI_NAME = zwfi_yefap_paypr-list1
DLI_ID = ' '
SHARED_DLI = 'X'
IMPORTING
DLI_DATA =
TABLES
DLI_ENTRIES = it_user
EXCEPTIONS
DLI_NOT_EXIST = 1
OPERATION_NO_AUTHORIZATION = 2
PARAMETER_ERROR = 3
X_ERROR = 4
OTHERS = 5
IF SY-SUBRC = 0.
loop at it_user.
if it_user-member_typ = 'A'.
reclist-receiver = it_user-member_adr.
reclist-rec_type = 'U'.
reclist-com_type = 'INT'.
reclist-notif_del = 'X'.
reclist-notif_ndel = 'X'.
append reclist.
elseif it_user-member_typ = ''.
reclist-receiver = it_user-member_nam.
reclist-rec_type = 'B'.
reclist-express = 'X'.
append reclist.
Endif.
endloop.
ENDIF.
ENDIF.
IF NOT ( zwfi_yefap_paypr-list2 IS INITIAL ).
clear it_user[].
CALL FUNCTION 'SO_DLI_READ_API1'
EXPORTING
DLI_NAME = zwfi_yefap_paypr-list2
DLI_ID = ' '
SHARED_DLI = 'X'
IMPORTING
DLI_DATA =
TABLES
DLI_ENTRIES = it_user
EXCEPTIONS
DLI_NOT_EXIST = 1
OPERATION_NO_AUTHORIZATION = 2
PARAMETER_ERROR = 3
X_ERROR = 4
OTHERS = 5
IF SY-SUBRC = 0.
loop at it_user.
if it_user-member_typ = 'A'.
reclist-receiver = it_user-member_adr.
reclist-rec_type = 'U'.
reclist-com_type = 'INT'.
reclist-notif_del = 'X'.
reclist-notif_ndel = 'X'.
append reclist.
elseif it_user-member_typ = ''.
reclist-receiver = it_user-member_nam.
reclist-rec_type = 'B'.
reclist-express = 'X'.
append reclist.
Endif.
endloop.
ENDIF.
endif.
ENDSELECT.
CLEAR error_text.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
COMMIT_WORK = 'X'
TABLES
packing_list = objpack
object_header = objhead
contents_bin = so_ali "objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
CASE sy-subrc.
WHEN 0.
write: / 'Result of the send process:'.
LOOP AT reclist.
write: / reclist-receiver(48), ':'.
IF reclist-retrn_code <> 0.
write 'The document was sent'.
else.
CONCATENATE 'The document could not be sent to : '(029)
reclist-receiver(48) INTO error_text.
ENDIF.
ENDLOOP.
WHEN 1.
error_text = text-030.
WHEN 2.
error_text = 'Document could not be sent to any recipient'(031).
WHEN 4.
error_text = 'No send authorization'(032).
WHEN OTHERS.
error_text = 'Error occurred while sending'(033).
ENDCASE.
IF NOT ( error_text IS INITIAL ).
CONCATENATE 'Mail send Error : '(034) error_text INTO error_text.
PERFORM WRITE_LOG(YEFAP_APERAK) USING ERROR_TEXT.
PERFORM write_log(zwfi_yefap_bank_report) USING error_text.
ENDIF.
CALL FUNCTION 'LIST_FREE_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
When I excute the same program in the foreground, Attachment in the mail is showing all the pages of the report output.
But when I excute the same program in the background only last page is shown in the mail attachemnt.
I think the problem is with the function module SAVE_LIST function module.
I replaced the SAVE_LIST function module with LIST_TO_MEMORY and LIST_FROM_MEMORY function modules.
It is also giving the same result.
In the foreground excution email attachemnt showing all the pages and in the background excution only last page is shown in the attachemnt.
I want all the pages dispalyed in the background mode excution in the email attachment.
How to slove this issue.
Thanks in advance.
RajaI have seen this problem before. Please have a look at this example program. This works very well when ran in background as well as foreground
* This program works in the background,
report zrich_0003 .
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
data: list type table of abaplist with header line.
data: ascilines(1024) type c occurs 0 with header line.
data: htmllines type table of w3html with header line.
parameters: p_check.
start-of-selection.
submit zrich_0004 exporting list to memory and return.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
call function 'LIST_TO_ASCI'
tables
listobject = list
listasci = ascilines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
call function 'WWW_HTML_FROM_LISTOBJECT'
tables
html = htmllines
listobject = list.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
commit work.
wait up to 2 seconds.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
Regards,
Rich Heilman -
PROBLEM WHILE SENDING MAILS TO MUTILPLE RECIPIENTS
hi,
while sending mails to multiple recipients,if any one of the mail id is invalid the mail is not being send to other valid mailids,how can this problem be resolved , so that other than the invalid recipient mail has to be send to other valid mailidsCOULD YOU PLEASE STOP SHOUTING?
CAN YOU TALK LOUDER, I CAN'T HEAR YOU! -
Problem while sending/Receiving request using the HttpURLConnection obj
Hi,
We are facing the problem while passing the request in Weblogic.
Looks like there is some problem with Weblogic while sending/Receiving the request using the HttpURLConnection object.
Currently we are migrating 2 applications to WebLogic. Application1 to application2 request should pass.
Below is some example we tried:
"When we send a request to our code using the SSOAdaptor code (which handles the request/session in our application) which is on the SunOne server the request parameters are received by our code successfully. And also in Create User Functionality of application1 we are sending a request to webpass(which is on Sunone Server) using the HttpURLConnection object and the SOAP request is received successfully by the Webpass."
Looks like when we send request (using HttpURLConnection) from a server other than Weblogic to a servlet in a Weblogic the request parameters are received with out issues.
Where as when the request is sent from WebLogic to WebLogic the request parameters are missing some how.
Is there any issue in Weblogic? Please helpus on this.
Thanks,
Nagesh
Edited by: user9307541 on Mar 15, 2010 5:08 AMHi,
Please find below scenario for testing.
We have tested the SSOAdaptor code (it is the fucntion name which will send the data from source) locally by hittiing the WPS adaptor URL in a Java client program(TestRequest.java) and the request parameters were reaching the WPS Adapter successfully.
Then we have written two test servlets to test the communication between SSOAdaptor(TestServlet.java) and WPS adaptor(WPSServlet.java).
Functionality of TestSevlet: It is sending a request to WPSServelt similar to the way we are doing it in SSOAdaptor.
Functionality of WPSServlet: It will receive the request parameters and write the parameter Map to console.
We have deployed and these two servlets(in a single webapplication) on Tomcat server and the request parameters are reaching the WPSServlet successfully.
Output on Tomcat server:
before sending request
**********************Inside WPS Servlet -- the request Map is:{TypeAcc=[Ljava.lang.String;@14e3f41, ServiceName=[Ljava.lang.String;@1acd47, GMEPortalUserID=[Ljava.lang.String;@19b04e2, UserID=[Ljava.lang.String;@5dcec6, Country=[Ljava.lang.String;@b25b9d}
after sending request
After this we have deployed these two servlets (with in a single webapplication) on the Weblogic server in Dev machine(path: /apps/usmport/domains/usmport/servers/usmport_admin/upload/ssoAdaptor/WEB-INF/classes/com/gm/gmeportal/security/adaptor) and
now the request parameters are not reaching the WPSServlet.
Output on Weblogic Server:
before sending request
**********************Inside WPS Servlet -- the request Map is:{}
after sending request
Looks like there is some problem with Weblogic while sending/Receiving the request using the HttpURLConnection object.
When we send a request to WPSAdaptor using the Old SSOAdaptor code which is on the SunOne server the request parameters are received by WPS successfully. And also in Create User Functionality of Portal we are sending a request to webpass(which is on Sunone Server) using the HttpURLConnection object and the SOAP request is received successfully by the Webpass.
Looks like when we send request (using HttpURLConnection) from a server other than Weblogic to a servlet in a Weblogic the request parameters are received with out issues. Where as when the request is sent from weblogic to weblogic the request parameters are missing some how.
Please find below javs source code used to test this:
TestRequest.java
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
public class TestRequest {
* @param args
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
excutePost("http://localhost:8080/Testing/TestServlet", "GMEPortalUserID=captest.wss@it0555&UserID=bl1133&Country=it&TypeAcc=256&ServiceName=Logon");
//System.out.println("********** Now the request is from SSO *****************");
//excuteGet("http://10.156.0.173:7013/channel21/wpsadapter", "GMEPortalUserID=captest.wss@it0554&UserID=bl1133&Country=it&TypeAcc=256&ServiceName=Logon");
public static String excutePost(String targetURL, String urlParameters)
URL url;
HttpURLConnection connection = null;
try {
//Create connection
url = new URL(targetURL);
connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
connection.setRequestProperty("Content-Length", "" +
Integer.toString(urlParameters.getBytes().length));
connection.setRequestProperty("Content-Language", "en-US");
connection.setUseCaches (false);
connection.setDoInput(true);
connection.setDoOutput(true);
//Send request
DataOutputStream wr = new DataOutputStream (
connection.getOutputStream ());
wr.writeBytes (urlParameters);
wr.flush ();
wr.close ();
//Get Response
InputStream is = connection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String line;
StringBuffer response = new StringBuffer();
while((line = rd.readLine()) != null) {
response.append(line);
response.append('\r');
rd.close();
System.out.println("Response is:" + response);
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if(connection != null) {
connection.disconnect();
public static String excuteGet(String targetURL, String urlParameters) throws Exception
URL url = new URL(targetURL);
HttpURLConnection httpurlconnection =
(HttpURLConnection) url.openConnection();
/*httpurlconnection.setRequestProperty(
"cookie",
constructRequestParams(httpservletrequest.getCookies()));*/
httpurlconnection.setDoOutput(true);
httpurlconnection.setDoInput(true);
httpurlconnection.setRequestProperty(
"Content-length",
String.valueOf(urlParameters.length()));
OutputStream outputstream = httpurlconnection.getOutputStream();
outputstream.write(urlParameters.getBytes());
outputstream.flush();
//Get Response
try{
InputStream is = httpurlconnection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String line;
StringBuffer response = new StringBuffer();
while((line = rd.readLine()) != null) {
response.append(line);
response.append('\r');
rd.close();
System.out.println("Response from SSO is:" + response);
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if(httpurlconnection != null) {
httpurlconnection.disconnect();
TestServlet.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
* Servlet implementation class TestServlet
public class TestServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
* Default constructor.
public TestServlet() {
// TODO Auto-generated constructor stub
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doPost(request,response);
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
//System.out.println("********************** the request Map is:" + request.getParameterMap());
try {
System.out.println("before sending request");
excuteGet("http://localhost:7003/ssoAdaptor/WPSServlet", "GMEPortalUserID=captest.wss@it0554&UserID=bl1133&Country=it&TypeAcc=256&ServiceName=Logon");
System.out.println("after sending request");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
public String excuteGet(String targetURL, String urlParameters) throws Exception
URL url = new URL(targetURL);
HttpURLConnection httpurlconnection =
(HttpURLConnection) url.openConnection();
/*httpurlconnection.setRequestProperty(
"cookie",
constructRequestParams(httpservletrequest.getCookies()));*/
httpurlconnection.setDoOutput(true);
httpurlconnection.setDoInput(true);
httpurlconnection.setRequestProperty(
"Content-length",
String.valueOf(urlParameters.length()));
OutputStream outputstream = httpurlconnection.getOutputStream();
outputstream.write(urlParameters.getBytes());
outputstream.flush();
//Get Response
try{
InputStream is = httpurlconnection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String line;
StringBuffer response = new StringBuffer();
while((line = rd.readLine()) != null) {
response.append(line);
response.append('\r');
rd.close();
//System.out.println("Response from SSO is:" + response);
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if(httpurlconnection != null) {
httpurlconnection.disconnect();
WPSServlet.java
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
* Servlet implementation class WPSServlet
public class WPSServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
* @see HttpServlet#HttpServlet()
public WPSServlet() {
super();
// TODO Auto-generated constructor stub
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
System.out.println("**********************Inside WPS Servlet -- the request Map is:" + request.getParameterMap());
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request,response);
Thanks,
Nagesh
Maybe you are looking for
-
Problems with Active Directory and Windows 2003
Hello, I'm using Mac OS X Server 10.4.9 with Active Directory bound to a Windows 2003 Active Directory Domain. I can bind successfully to the domain using the graphical interface. Then in Samba I can access shared directories using Windows users. How
-
I am having problems downloading adobe flash 2011 on my laptop I have 128 bit and I think windows 7 or XP I have a hp laptop can someone help me please.
-
I have been working with Dreamweaver CS4 for sometime now. I tried to open a file but it took forever so I tried to force quit it. Still it was not responding so I shut my computer down and waited for 30 minutes. I tried to open it again but after
-
Using PSP as an itunes remote with Coverbuddy
Has anyone successfully got Coverbuddy to work? I think it is working OK on the mac but the PSP is not seeing it. Actually, can I ask this question here as it is not an apple product? Apologies if I can't.
-
Iphone 5 home button not working!!Although me screen is cracked
my screen broke a couple of months ago and now my home button isnt working..any suggestions