Tuesday, December 20, 2011

Invocation of One way webservice deployed in Oracle SOA Suite from SalesForce.com (SFDC)


Invocation of One way webservice deployed in Oracle SOA Suite from SalesForce.com (SFDC):

Whenever SFDC tries to consume the WSDL which has one-way operation (operation with only input) it fails with the following error –“Can’t find the output in the port type execute_ptt”.



As a solution we can specify a dummy output of type string, so that SFDC is able to consume the WSDL and create the classes related to the elements of the WSDL.




Invocation of webservices deployed in Oracle SOA Suite from SalesForce.com (SFDC)


Invocation of webservices deployed in Oracle SOA Suite from SalesForce.com (SFDC):

Whenever SFDC tries to consume the WSDL which has imports (another XSD or WSDL) it fails with the error - “The import is not recognized



As a solution we have to prepare a linear WSDL (wsdl without imports –coping the contents of the imported XSD/WSDL to the parent WSDL), so that SFDC is able to consume the WSDL and create the classes related to the elements of the WSDL.




Monday, December 19, 2011

Oracle SOA Suite 11g - Multiple partner link endpoint locations to enable failover in composite.

Oracle SOA Suite 11g - Multiple partner link endpoint locations to enable failover in composite.:

Oracle SOA Suite provides the support for specifying multiple partner link endpoint locations. This capability is useful for failover purposes if the first endpoint is down.

The endpointURI property of the Composite.xml will help us to override the endpoint location specified in the default WSDL as shown below.

<reference name="HelloworldService"
ui:wsdlLocation="http://localhost:8000/soa-infra/services/default/HelloWorld/Helloworld.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/Failover/HelloWorld/Helloworld#wsdl.interface(Helloworld)"
callbackInterface="http://xmlns.oracle.com/Failover/HelloWorld/Helloworld#wsdl.interface(HelloworldCallback)"/>
<binding.ws port="http://xmlns.oracle.com/Failover/HelloWorld/Helloworld#wsdl.endpoint(helloworld_client_ep/Helloworld_pt)"
location="http://localhost:8000/soa-infra/services/default/HelloWorld/helloworld_client_ep?WSDL"
soapVersion="1.1">
<property name="endpointURI">http://localhost:8002/soa-infra/services/MEDIATOR/HelloWorld/helloworld_client_ep</property>
<property name="endpointURI">http://localhost:8002/soa-infra/services/UTILITIES/HelloWorld/helloworld_client_ep</property>
<property name="weblogic.wsee.wsat.transaction.flowOption"
type="xs:string" many="false">WSDLDriven</property>
</binding.ws>
<callback>
<binding.ws port="http://xmlns.oracle.com/Failover/HelloWorld/Helloworld#wsdl.endpoint(helloworld_client_ep/HelloworldCallback_pt)"/>
</callback>
</reference>

In runtime the location specified in the endpointURI at the end will be invoked first and if it fails it will try to invoke the previous endpointURI specified and so on; if all the endpointURI invocations are failed, the location(default) specified in the WSDL file will be invoked.
endpointURI’s:



Default location:




Saturday, December 10, 2011

WLST script to change the log setting for all the servers in the weblogic domain

The below WLST script will help us to change the log setting for all the servers in the weblogic domain.

DomainLogConfigurtionChange.py

from java.io import FileInputStream

propInputStream = FileInputStream("domain_log.properties")
configProps = Properties()
configProps.load(propInputStream)

rotationType=configProps.get("rotationType")
fileMinSize=configProps.get("fileMinSize")
rotateLogOnStartup=configProps.get("rotateLogOnStartup")
fileCount=configProps.get("fileCount")
log4jEnabled = configProps.get("log4jEnabled")
stdoutSeverity = configProps.get("stdoutSeverity")
logBRSeverity = configProps.get("logBRSeverity")
logFileSeverity = configProps.get("logFileSeverity")
memBufferSeverity = configProps.get("memBufferSeverity")
memBufferSize = configProps.get("memBufferSize")
numOfFilesLimited = configProps.get("numOfFilesLimited")
redirectStdout = configProps.get("redirectStdout")
redirectStdErr = configProps.get("redirectStdErr")
rotateOnStartup = configProps.get("rotateOnStartup")
rotateType = configProps.get("rotateType")
httpAccessLoggingEnabled = configProps.get("httpAccessLoggingEnabled")

domainAdminUrl = configProps.get("domain.admin.url")
folderPath=configProps.get("domain.folderPath")
domainAdminUserName = configProps.get("domain.admin.username")
domainAdminPassword = configProps.get("domain.admin.password")

connect(domainAdminUserName, domainAdminPassword, domainAdminUrl)
servers = adminHome.getMBeansByType('Server')
for s in servers:
edit()
startEdit()
serverName1 = s.getName()
print '----------------------------------------------------'
print 'Changing Log Setting for serverName: ' , serverName1
print '----------------------------------------------------'
cd('/Servers/' + serverName1 + '/Log/' + serverName1)
print "Original FileCount is " ,get("FileCount")
print "Setting FileCount to be " , fileCount
set("FileCount", int(fileCount))
print "Original FileMinSize is " , get("FileMinSize")
print "Setting FileMinSize to be " , fileMinSize
set("FileMinSize", int(fileMinSize))
print "Original FileName is " , get("FileName")
print "Setting FileName to be " + folderPath+ "/logs/"+serverName1+ "/" + serverName1 + ".log"

set("FileName", folderPath+ '/logs/'+serverName1+ "/"  + serverName1 + '.log')

print "Original FileTimeSpan is " , get("FileTimeSpan")
#print "Setting FileTimeSpan to be " , fileTimeSpan
#set("FileTimeSpan", fileTimeSpan)

print "Original Log4jEnabled is " , get("Log4jLoggingEnabled")
print "Setting Log4jLoggingEnabled to be " , log4jEnabled
set("Log4jLoggingEnabled", log4jEnabled)

print "Original StdoutSeverity is " , get("StdoutSeverity")
print "Setting StdoutSeverity to be " , stdoutSeverity
set("StdoutSeverity", stdoutSeverity)

print "Original DomainLogBroadcastSeverity is " , get("DomainLogBroadcastSeverity")
print "Setting DomainLogBroadcastSeverity to be " , logBRSeverity
set("DomainLogBroadcastSeverity", logBRSeverity)

print "Original LogFileSeverity is " , get("LogFileSeverity")
print "Setting LogFileSeverity to be " , logFileSeverity
set("LogFileSeverity", logFileSeverity)

print "Original MemoryBufferSeverity is " , get("MemoryBufferSeverity")
print "Setting MemoryBufferSeverity to be " , memBufferSeverity
set("MemoryBufferSeverity", memBufferSeverity)

print "Original MemoryBufferSize is " , get("MemoryBufferSize")
print "Setting MemoryBufferSize to be " , memBufferSize
set("MemoryBufferSize", int(memBufferSize))

print "Original NumberOfFilesLimited is " , get("NumberOfFilesLimited")
print "Setting NumberOfFilesLimited to be " , numOfFilesLimited
set("NumberOfFilesLimited", numOfFilesLimited)

print "Original RedirectStdoutToServerLogEnabled is " , get("RedirectStdoutToServerLogEnabled")
print "Setting RedirectStdoutToServerLogEnabled to be " , redirectStdout
set("RedirectStdoutToServerLogEnabled", redirectStdout)

print "Original RedirectStderrToServerLogEnabled is " , get("RedirectStderrToServerLogEnabled")
print "Setting RedirectStderrToServerLogEnabled to be " , redirectStdErr
set("RedirectStderrToServerLogEnabled", redirectStdErr)

print "Original RotateLogOnStartup is " , get("RotateLogOnStartup")
print "Setting RotateLogOnStartup to be " , rotateOnStartup
set("RotateLogOnStartup", rotateOnStartup)

print "Original RotationType is " , get("RotationType")
print "Setting RotationType to be " , rotateType
set("RotationType", rotateType)

print '===> Log Setting for serverName: ' , serverName1, ' has been changed Successfully !!'
print ''

#Webserver Http Access Log
print '===> Log Setting changes for Http Access Log: '
cd('/Servers/'+serverName1+'/WebServer/'+serverName1+'/WebServerLog/'+serverName1)

set("FileName", folderPath+ '/logs/'+serverName1+ "/"  + 'accesss.log')
print "Original Http Access LoggingEnabled is " , get("LoggingEnabled")
print "Setting Http Access LoggingEnabled to be " , httpAccessLoggingEnabled
set("LoggingEnabled", httpAccessLoggingEnabled)

print "Original NumberOfFilesLimited is " , get("NumberOfFilesLimited")
print "Setting NumberOfFilesLimited to be " , numOfFilesLimited
set("NumberOfFilesLimited", numOfFilesLimited)

print "Original RotateLogOnStartup is " , get("RotateLogOnStartup")
print "Setting RotateLogOnStartup to be " , rotateOnStartup
set("RotateLogOnStartup", rotateOnStartup)

print "Original RotationType is " , get("RotationType")
print "Setting RotationType to be " , rotateType
set("RotationType", rotateType)

save()
activate()

print '===> Log Settings for serverName: ' , serverName1, ' has been changed Successfully !!'

print ''



domain_log.properties

fileCount = 10
fileMinSize = 20000
fileTimeSpan = 12
log4jEnabled = false
httpAccessLoggingEnabled = true
stdoutSeverity = Info
logBRSeverity = Info
logFileSeverity = Info
memBufferSeverity = Info
memBufferSize = 400
numOfFilesLimited = true
redirectStdout = true
redirectStdErr = true
rotateOnStartup = true
rotateType = bySize

domain.folderPath = c://albin/SOACoreDomain
domain.admin.url=t3://127.0.0.1:7001
domain.admin.username=weblogic
domain.admin.password=welcome1


Execute the script:
cd %WLS_HOME%\common\bin
wlst.sh DomainLogConfigurtionChange.py


O/P





Contact Form

Name

Email *

Message *