Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Extract delimited text in Oracle BPM

Robinson JOct 15 2018 — edited Oct 17 2018

Hi Experts

I have a payload within the BPM Process where a webservice returns me a list of approvers ex: tom,lee,Ben which are basically users. My requirement is to extract these users individually and assign to a node which is like target node below

Source Node

<xs:complexType name="approvalRouteByInvoiceNatureResponse">

    <xs:complexContent>

      <xs:extension base="tns:messageValueObject">

        <xs:sequence>

          <xs:element type="xs:string" name="approvalRoute" minOccurs="0"/>

          <xs:element type="xs:boolean" name="autoApprove" minOccurs="0"/>

          <xs:element type="tns:integrationResponse" name="integrationResponse" minOccurs="0"/>

          <xs:element type="tns:statusResponse" name="statusResponse" minOccurs="0"/>

        </xs:sequence>

      </xs:extension>

    </xs:complexContent>

  </xs:complexType>

and the target node would look like

<?xml version="1.0" encoding="windows-1252" ?>

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

            xmlns="http://www.example.org"

            targetNamespace="http://www.example.org"

            elementFormDefault="qualified">

  <xsd:element name="ApprovalRoute">

    <xsd:complexType>

    <xsd:sequence>

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

    </xsd:sequence>

    </xsd:complexType>

  </xsd:element>

</xsd:schema>

The reason being i would like to do some logic on each user,what will be the best way to get the individual users from the webservice ,

Thanks for Help

Robin

Comments

Bill Shannon-Oracle
It sounds like you may be using a proxy server to access your mail server.
See this FAQ entry: http://www.oracle.com/technetwork/java/javamail/faq/index.html#proxy
819306
hi

Thank you for your reply.
I can send mail to this exchange server without using any proxy.Just as normal javamail.But I couldn't read mails .I got timed out Exception.

Thanks in advance
Bill Shannon-Oracle
The JavaMail FAQ has tips for debugging connection problems, try those.

Are you sure your Exchange server has IMAP support enabled?
How you tried both plain text IMAP and IMAP over SSL?
819306
couldn't find tips to avoid this exception and get connection.
Yes the server is imap enabled.
Bill Shannon-Oracle
Did you look here:
http://www.oracle.com/technetwork/java/javamail/faq/index.html#condebug
819306
Hi

I got connection while telnet x.x.xc.xx 143 after disscusion with admin.And Again I try the program below then I got the error No login methods supported


String host="x.x.xc.xx";
final String username="sdsdsa@ss-ssmanagement.com";
final String password="88888888888";

Authenticator auth=new Authenticator()
{

protected PasswordAuthentication getPasswordAuthentication()
{
return new PasswordAuthentication(username, password);
}

};
Properties props=System.getProperties();
props.put("mail.imaps.timeout", "120000");
Session session = Session.getInstance(props,auth);
session.setDebug(true);
Store store = session.getStore("imap");


System.out.println("store------"+store);
store.connect(host, username, password);
System.out.println("Connected...");
Folder inbox = store.getDefaultFolder().getFolder("INBOX");
inbox.open(Folder.READ_ONLY);

Message[] msg = inbox.getMessages();

System.out.println(msg);

inbox.close(false);
store.close();

ANd I got the error as below

EBUG: trying to connect to host "x.x.xc.xx", port 143, isSSL false
* OK The Microsoft Exchange IMAP4 service is ready.
A0 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 LOGINDISABLED IDLE NAMESPACE LITERAL+
A0 OK CAPABILITY completed.
DEBUG: protocolConnect login, host=x.x.xc.xx, user=sdsdsa@ss-ssmanagement.com, password=<non-null>
javax.mail.MessagingException: No login methods supported!;
nested exception is:
com.sun.mail.iap.ProtocolException: No login methods supported!
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:663)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at BsmMail.main(BsmMail.java:44)
Caused by: com.sun.mail.iap.ProtocolException: No login methods supported!
at com.sun.mail.imap.IMAPStore.login(IMAPStore.java:725)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:643)
... 3 more
Bill Shannon-Oracle
I suspect you need to connect over SSL. That is, use getStore("imaps").

(Note that you were setting the mail.imaps.timeout property even though
you were using the "imap" protocol. Probably not what you intended.
819306
Thank you for your quick reply,

I use Store store = session.getStore("imaps"); and I remove props.put("mail.imaps.timeout", "120000"); from program

String host="x.x.xc.xx";
final String username="sdsdsa@ss-ssmanagement.com";
final String password="88888888888";

Authenticator auth=new Authenticator()
{

protected PasswordAuthentication getPasswordAuthentication()
{
return new PasswordAuthentication(username, password);
}

};
Properties props=System.getProperties();

Session session = Session.getInstance(props,auth);
session.setDebug(true);
Store store = session.getStore("imaps");


System.out.println("store------"+store);
store.connect(host, username, password);
System.out.println("Connected...");
Folder inbox = store.getDefaultFolder().getFolder("INBOX");
inbox.open(Folder.READ_ONLY);

Message[] msg = inbox.getMessages();




then I got

DEBUG: setDebug: JavaMail version 1.4.4
DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc]
DEBUG: mail.imap.fetchsize: 16384
DEBUG: mail.imap.statuscachetimeout: 1000
DEBUG: mail.imap.appendbuffersize: -1
DEBUG: mail.imap.minidletime: 10
store------imaps:
DEBUG: trying to connect to host "x.x.xc.xx", port 993, isSSL true
javax.mail.MessagingException: Unrecognized SSL message, plaintext connection?;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:665)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at BsmMail.main(BsmMail.java:44)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:507)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
at com.sun.mail.iap.Protocol.<init>(Protocol.java:113)
at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:110)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:632)
... 3 more

Edited by: Shanu on Feb 2, 2011 12:15 AM

Edited by: Shanu on Feb 2, 2011 12:17 AM
Bill Shannon-Oracle
I have no idea. Perhaps your server is configured to use a non-standard port
for IMAP over SSL? You'll need to talk to your mail server administrator.
1 - 9

Post Details

Added on Oct 15 2018
7 comments
557 views