Skip to main content

#Mule 30 discutindo

Additionally, the things I tried,

After Executing the MMA Tool on my project (Mule 3), I tried to replace the unsupported CXF component with Web Service Consumer (Which I think is the only component that should suffice the requirement.

While doing so, I am encountering an error in logs that talks about below:

Error reading XMLStreamer: Undeclared namespace prefix "soapenv"

 

Well, the CXF component has a field for Inbound Attributes Namespace to define the information but the same I didn't see in Web Service Consumer.

 

Could you please guide me @Akshata Sawant​ @Gaurav Dhimate​ 

@Manish Yadav​ @Abhishek Bathwal​ @Jitendra Bafna​ @Vikalp Bhalia​ @Vikalp Bhalia​ 

 

#Mule 3​ #Mule 4​ #Mule Migration Assistant (MMA)​ #Migration​ #Unsupported Components

3 respostas
0/9000

How to call HTTP GET method in mule 3 by passing some json payload.

 

i tried sending header: content-type as application/json but it doesn't seems to send payload to get request.

 

i'm setting payload in transform with application/json before http GET requester.

 

Can someone advise how to achieve this.

 

@Manish Yadav​  #Mule 3​ 

2 respostas
0/9000

i'm forming the JSON keys from JSON values. However sometime one particular key is having special character (* or &) in it. Which is causing error while processing. How do we remove or replace special characters in JSON Keys in Mule 3.

 

Key with special character: OPTIN*00012AC

 

Input payload with special character:

{

"request": {

"shippingGroups": [{

"orderAction": "order",

"priceInfo": {

"amount": 10.45

},

"discountInfo": {

"unclaimedCoupon": {},

"orderCoupons": {

"OPTIN*00012AC": {

"promotionDesc": "Promooptintest"

}

},

"orderImplicitDiscountList": [],

"unclaimedCoupon": {},

"claimedCoupon": {

"OPTIN*00012AC": [{

"promotionDesc": "Promooptintest"

 

}]

}

} }] }}

Expected Output:

{

"request": {

"shippingGroups": [{

"orderAction": "order",

"priceInfo": {

"amount": 10.45

},

"discountInfo": {

"unclaimedCoupon": {},

"orderCoupons": {

"OPTIN00012AC": {

"promotionDesc": "Promooptintest"

}

},

"orderImplicitDiscountList": [],

"unclaimedCoupon": {},

"claimedCoupon": {

"OPTIN00012AC": [{

"promotionDesc": "Promooptintest"

 

}]

}

} }] }}

@mulesoft #Mule 3​ 

4 respostas
  1. Shekh Muenuddeen (NTTData) Forum Ambassador
    12 de jul. de 2020, 17:44

    Hi,

     

    As I have replace * with "" with every key may be below Dataweave code will help you.

    %dw 2.0

    output application/json

    import * from dw::core::Objects

     

    fun mappingObject(data) = if((data is Object) == false) data else

    data mapObject ((value, key, index) ->

    value match {

    case value is Object -> (if(key contains('*')) (key replace '*' with "") else key) : mappingObject(value)

    case value is Array -> (if(key contains('*')) (key replace '*' with "") else key) : value map (mappingObject($))

    else -> (if(key contains('*')) (key replace '*' with "") else key) : value

    }

    )

     

    ---

    mappingObject(payload)

    Regards,

    Shekh

0/9000

I am capturing all the batch errors in one of the batch step using flowVars and getStepExceptions(). I want to use the same flowVar and its value in cloud Hub connector and create email notification. But Notification is not getting triggered. It is working only in the on-complete phase. I want to send the batch step errors as an email. #Mule 3​ 

0/9000