RightFax 10.5 java integration issue - rightfax

I am trying to do some POC on Rightfax integration with JAVA API. Installed all required components in Rightfax Server (JAVA/XML API) and configured the IIS (took care while installing the rightfax server) while running the sample java program getting following message
here are the details of the output in debug mode
<XML_FAX_SUBMIT java="1" stylesheet="XML_FAX_SUBMIT.xslt" xmlns="x-schema:XML_FAX_SUBMIT.xdr">
<INCLUDE_BEG>xml.beg</INCLUDE_BEG>
<SENDER>
<RF_USER>ADMINISTRATOR</RF_USER>
</SENDER>
<DESTINATIONS>
<FAX>
<TO_FAXNUM>555-7777</TO_FAXNUM>
</FAX>
</DESTINATIONS>
<BODY>
How about some body text.
Line 2
Line 3
</BODY>
<INCLUDE_END>xml.end</INCLUDE_END>
</XML_FAX_SUBMIT>
Initiating Connection to: http://<name>/rfxml/rfwebcon.dll
RETURN XML:
<?xml version="1.0"?>
<XML_FAX_SUBMIT_REPLY>
<FAX unique_id="unknown">
<STATUS_CODE>-1</STATUS_CODE>
<STATUS_MSG>Failed to load XML into DOM tree.</STATUS_MSG>
</FAX>
</XML_FAX_SUBMIT_REPLY>
Message Successfully Transported
ID: unknown
`Code`: -1
**Msg: Failed to load XML into DOM tree.**
Ended
could anyone help me if you come across this type of issue or any configuration is missing at Fax Server or IIS side.

//Create a outbound fax object
RFaxSubmit faxSubmit= new RFaxSubmit();
//set XMLNS and make sure you have XML_FAX_SUBMIT_schema.xml in your classpath.
faxSubmit.m_FaxDocument.setXMLNS("classpath:XML_FAX_SUBMIT_schema.xml");
This file must be available on your RightFax server, # this location \RightFax\Production\xml\schemas\XML_FAX_SUBMIT_schema.xml download this file or ask server support and add it in your classpath.

Related

Posting byte message in solace queue through jmeter

Need to post a byte message to solace queue using Jmeter. I have tried in following manner might be am incorrect but tried with following:
Use JMSPublisher sampler
create jndi.properties file and put in jmeter/lib
jndi.properties
java.naming.factory.initial = com.solacesystems.jndi.SolJNDIInitialContextFactory
java.naming.provider.url = smf://<remote IP and port>
java.naming.security.principal=<username>
java.naming.security.credentials=<password>
Solace_JMS_VPN=<VPN Name>
in JMSPublisher sampler (in GUI)
Connection Factory = connectionFactory
Destination = (Queue Name )
Message Type (radio button---Byte message)
Content encoding -- RAW
in text area ---> (Byte message)
Note : I have used actual values of IP/port/username/port/queuename/bytemessage, cannot share those. Soljms jar is available in lib folder too.
getting error :
Response message: javax.naming.NamingException: JNDI lookup failed - 503: Service Unavailable [Root exception is (null) com.solacesystems.jcsmp.JCSMPErrorResponseException: 503: Service Unavailable]
Though it is working perfectly fine when did with java spring boot. There used properties files in place of JNDI.
It would be great if anyone can guide me , please do not give activeMQ JNDI am actively looking for posting on solace queue or create connection to solace appliances through Jmeter.
I don't think you should be putting your Byte message into the textarea as it accepts either plain text or an XStream object, consider providing your payload via binary file(s) instead
If you're capable of sending the message using Java code you should be able to replicate the same using:
JMeter's JSR223 Sampler with Groovy language (Java syntax will work)
Or JUnit Request sampler if you need "strict" java

QuickBooks Web Connector Error: The element 'QBXML' is used but not declared in the DTD/Schema

I have a web server connecting to QuickBooks Desktop via the Web Connector. Most of my transaction types are working, but I have a few which are not. When I run them through the XML validator, I get this error:
Requested validation for QB Web Connector (qwc), file has processing instruction indicating <?qbxml... obeying processing instruction
Line: 2
LinePos: 8
Src Text:
Reason: The element 'QBXML' is used but not declared in the DTD/Schema.
My QBXML is as follows:
<?xml version="1.0" ?><?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError = "stopOnError">
<ReceivePaymentAddRq requestID = "2">
<ReceivePaymentAdd>
<CustomerRef>
<ListID>8000017D-1509724466</ListID>
</CustomerRef>
<TxnDate>2016-01-04</TxnDate>
<RefNumber>1000</RefNumber>
<TotalAmount>39.99</TotalAmount>
<PaymentMethodRef>
<FullName>Cash</FullName>
</PaymentMethodRef>
<AppliedToTxnAdd>
<TxnID>81E-1509734863</TxnID>
<PaymentAmount>39.99</PaymentAmount>
</AppliedToTxnAdd>
</ReceivePaymentAdd>
</ReceivePaymentAddRq>
</QBXMLMsgsRq>
</QBXML>
The XML validator says the QBXML is valid for both the Desktop and On-Line versions, but gives the error when testing for the Web Connector
I'm having this issue with EmployeeAdd, ReceivePaymentAdd and PaymentMethodAdd. I'm not having it with AccountAdd, ClassAdd, CustomerAdd, ItemServiceAdd or InvoiceAdd.
I've tried changing the Version to everything between 2.0 and 13.0
Has anyone else run across this and found a solution?
When I run them through the XML validator, I get this error:
You're using the wrong settings in the validator.
You should NEVER be validating against the Web Connector option
(that is for validating .qwc files, vs. actual qbXML requests)
You should NEVER be validating against Online (QuickBooks Online no
longer uses qbXML at all)
Always validate against the Desktop version option
If you're experiencing errors, then you need to post the actual error you're getting along with the actual requests that you're sending so that we can help you.

Event log warning "URL for this request exceeds the configured maxUrlLength" despite request succeeding

On my IIS server, I'm getting a warning message logged in the server's Application Event Log on a particular variety of incoming HTTP request with a long URL. Despite the warning message, ASP.NET MVC does correctly handle the request and return the expected response back to the client.
The event log message warning message includes the following text:
Event code: 3005
Event message: An unhandled exception has occurred.
...
Process information:
Process name: w3wp.exe
....
Exception information:
Exception type: HttpException
Exception message: The length of the URL for this request exceeds the configured maxUrlLength value.
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
Additional property/value information for the event log warning message:
Source: ASP.NET 4.0.30319.0
Event ID: 1309
Again, in this case the incoming HTTP request is ultimately succeeding, so unlike similar questions my question here is not how to successfully increase the max URL length for incoming requests on my server.
Rather, my question is: Given that my request is succeeding, can I prevent this (apparently spurious) warning message from being logged to my Application event log (adding noise to the log that may obscure other, "real" warnings)?
More details
This behavior (long HTTP request succeeds; warning message written to application event log) is reproducible both on my local workstation PC running Windows 10 and IIS 10, and on my production server running Windows Server 2008 R2 and IIS 7.5.
The project is being built with target framework: .NET Framework 4.5.1. (Update: The error still reproduces after rebuilding my project to target .NET Framework 4.6.1.)
The URLs that trigger the warning message to be written are long URLs (approximately 500 characters in length) of the form (for example):
https://myserver.example.com:443/api/MyDataRequestRoute/1862241,2146171,1998613,1916341,2150391,2067889,749865,2167130,1861707,1914448,668472,2170269,2162087,2024193,1857969,1869304,2162128,1980539,992479,1347745,1958431,282062,1925128,2147391,2153550,1187318,2039442,441327,1298384,2153556,1526985,1893085,2144727,2144288,1582412,2142540,2170281,1183488,1865249,1348332,1322007,2170282,2170283,1750061,2098502,1915955,905164,1353083,2099151,1347806,2160403,2147200,1191371,1347921,1909967,2017687,2012831
The URL is mapped to an ASP.NET MVC Controller method of the form:
[HttpGet]
[Route("MyDataRequestRoute/{commaSeparatedPropertyIDs}", Name = "MyDataRequestRoute")]
public HttpResponseMessage MyDataRequestRoute(string csv)
{
string xmlResult = // Code to build result based on the specified csv...
return new HttpResponseMessage()
{
Content = new StringContent(xmlResult, Encoding.UTF8, "text/xml")
};
}
In order to get these long URLs working, I previously made a few configuration changes to my application and server, specifically:
Set an UrlSegmentMaxLength value of 32766 in the server's Windows registry, per this answer.
Set attributes of the httpRuntime element in my "Api" project's web.config file:
<httpRuntime targetFramework="4.5" maxRequestLength="131072" maxUrlLength="32766" maxQueryStringLength="32766" />
Set the maxAllowedContentLength attribute of the requestLimits element in the same web.config file:
<requestLimits maxAllowedContentLength="134217728" />

Mule HTTP Request Config with OAuth2

I am experimenting with OAuth2 on HTTP request connector. It is throwing the below exception always:
SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'oauth2:authorization-code-grant-type'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/http":abstract-http-request-authentication-provider, "http://www.mulesoft.org/schema/mule/tcp":client-socket-properties, "http://www.mulesoft.org/schema/mule/tls":context, "http://www.mulesoft.org/schema/mule/http":raml-api-configuration, "http://www.mulesoft.org/schema/mule/http":proxy, "http://www.mulesoft.org/schema/mule/http":ntlm-proxy}' is expected
Here is my configuration:
<http:request-config name="SF_Authorize_Configuration" protocol="HTTPS" host="${login.host}" basePath="${oauth2.url}" port="80" doc:name="Authorize Configuration" >
<oauth2:authorization-code-grant-type clientId="my_client_id" clientSecret="my_client_secret" redirectionUrl="http://localhost:8081/oauth2callback">
<oauth2:authorization-request authorizationUrl="https://my.api.com/services/oauth2/authorize" localAuthorizationUrl="http://localhost:8082/authorization" scopes="access_user_details, read_user_files">
</oauth2:authorization-request>
<oauth2:token-request tokenUrl="https://my.api.com/services/oauth2/token"/>
</oauth2:authorization-code-grant-type>
</http:request-config>
This means that you have not provided the xml namespace for the xml tag.
If you have not used the UI to create this then please create using the design and then you can copy and paste your specific tag later by replacing it.
Edited answer,
It was similar for me for API kit. I re installed the Studio(Unzipped it again). This might work .
I have encountered the same issue. It was resolved by adding oauth2 namespace at the start mule tag, e.g.:
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
...
xmlns:oauth2="http://www.mulesoft.org/schema/mule/oauth2"
http://www.mulesoft.org/schema/mule/oauth2
...
>

Fault calling SAP web service with generated SUDZC proxy: CX_ST_MATCH_ELEMENT

Trying to call a SAP SOAP Web Service from a generated sudzc app shows errors I don't know:
SudzCExamples[5192:f803] <?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:sap-
com:document:sap:soap:functions:mc-style"><soap:Body><ZComUrlGetrecords>
<IYear>2012</IYear></ZComUrlGetrecords></soap:Body></soap:Envelope>
SudzCExamples[5192:f803] <soap-env:Envelope xmlns:soap-
env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header></soap-env:Header><soap-
env:Body><soap-env:Fault><faultcode>soap-env:Server</faultcode><faultstring
xml:lang="en">CX_ST_MATCH_ELEMENT:XSLT exception.System expected element
'IYear'</faultstring><detail><ns:SystemFault
xmlns:ns="http://www.sap.com/webas/710/soap/runtime/abap/fault/system/">
<Host>undefined</Host><Component>APPL</Component><ChainedException>
<Exception_Name>CX_SOAP_CORE</Exception_Name><Exception_Text>CX_ST_MATCH_ELEMENT:XSLT
exception.System expected element 'IYear'</Exception_Text></ChainedException>
<ChainedException><Exception_Name>CX_SXMLP</Exception_Name><Exception_Text>XSLT
exception</Exception_Text></ChainedException><ChainedException>
<Exception_Name>CX_ST_MATCH_ELEMENT</Exception_Name><Exception_Text>System expected
element 'IYear': Main Program:/1BCDWB/WSS825E06E4DEC40F9171D|
Program:/1BCDWB/WSS825E06E4DEC40F9171D| Line: 18| Valid:X</Exception_Text>
</ChainedException></ns:SystemFault></detail></soap-env:Fault></soap-env:Body></soap-
env:Envelope>
2012-03-11 20:09:30.631 SudzCExamples[5192:f803] soap-env:Server CX_ST_MATCH_ELEMENT:XSLT
exception.System expected element 'IYear'
(null)
The strange thing is that it seems as if the request has the IYear element. Can someone tell me where to search the problem?
I ran into this same problem yesterday and discovered the solution after some experimentation. First thing I did was use my SoapUI client to make the request successfully. SoapUI comes with a free trial and even if you do not use the free trial you can still use it to make accesses to the web service without registering it. I used the xml from the successful request I made to compare against the request that SudzC was making. They differ in several ways, and the way that SudzC forms the request is not sufficient.
My suggestion to you is to compare the two requests and change SudzC's request to match the SoapUI request. You can do this by editing the Soap source code that SudzC gives to you, this source code is found particularly in the Soap.m file in the createEnvelope function.
Also, if your requests have an empty header SudzC does not include the header part of the request. Hard code in an empty header after the namespace portion of the envelope. Doing all this fixed this exact issue for me.

Resources